From f7e5fb61b14980fba93557ccaa1ad2c4c98bae1f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Nov 2017 17:18:04 +0100 Subject: [PATCH] Remove unused wxSoundSyncOnlyAdaptor::m_playing variable It seems to have been replaced by wxSoundPlaybackStatus::m_playing a long time ago but was still kept, resulting in confusion and always returning false from IsPlaying() as it tested a wrong variable. Fix this by removing this one completely and always using the other one everywhere. --- src/unix/sound.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/unix/sound.cpp b/src/unix/sound.cpp index 342a58f7e4..394c786d66 100644 --- a/src/unix/sound.cpp +++ b/src/unix/sound.cpp @@ -294,7 +294,7 @@ class wxSoundSyncOnlyAdaptor : public wxSoundBackend { public: wxSoundSyncOnlyAdaptor(wxSoundBackend *backend) - : m_backend(backend), m_playing(false) {} + : m_backend(backend) {} virtual ~wxSoundSyncOnlyAdaptor() { delete m_backend; @@ -324,7 +324,6 @@ private: friend class wxSoundAsyncPlaybackThread; wxSoundBackend *m_backend; - bool m_playing; #if wxUSE_THREADS // player thread holds this mutex and releases it after it finishes // playing, so that the main thread knows when it can play sound @@ -341,7 +340,7 @@ wxThread::ExitCode wxSoundAsyncPlaybackThread::Entry() &m_adapt->m_status); m_data->DecRef(); - m_adapt->m_playing = false; + m_adapt->m_status.m_playing = false; m_adapt->m_mutexRightToPlay.Unlock(); wxLogTrace(wxT("sound"), wxT("terminated async playback thread")); return 0;