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.
This commit is contained in:
@@ -294,7 +294,7 @@ class wxSoundSyncOnlyAdaptor : public wxSoundBackend
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxSoundSyncOnlyAdaptor(wxSoundBackend *backend)
|
wxSoundSyncOnlyAdaptor(wxSoundBackend *backend)
|
||||||
: m_backend(backend), m_playing(false) {}
|
: m_backend(backend) {}
|
||||||
virtual ~wxSoundSyncOnlyAdaptor()
|
virtual ~wxSoundSyncOnlyAdaptor()
|
||||||
{
|
{
|
||||||
delete m_backend;
|
delete m_backend;
|
||||||
@@ -324,7 +324,6 @@ private:
|
|||||||
friend class wxSoundAsyncPlaybackThread;
|
friend class wxSoundAsyncPlaybackThread;
|
||||||
|
|
||||||
wxSoundBackend *m_backend;
|
wxSoundBackend *m_backend;
|
||||||
bool m_playing;
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
// player thread holds this mutex and releases it after it finishes
|
// player thread holds this mutex and releases it after it finishes
|
||||||
// playing, so that the main thread knows when it can play sound
|
// 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_adapt->m_status);
|
||||||
|
|
||||||
m_data->DecRef();
|
m_data->DecRef();
|
||||||
m_adapt->m_playing = false;
|
m_adapt->m_status.m_playing = false;
|
||||||
m_adapt->m_mutexRightToPlay.Unlock();
|
m_adapt->m_mutexRightToPlay.Unlock();
|
||||||
wxLogTrace(wxT("sound"), wxT("terminated async playback thread"));
|
wxLogTrace(wxT("sound"), wxT("terminated async playback thread"));
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user