X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f156e20c8e21594f901bfce15db4459208ec9571..a6de86fa530d95b6f30e0349e81de8b8692b348f:/src/unix/sound.cpp diff --git a/src/unix/sound.cpp b/src/unix/sound.cpp index 30ce40656f..63dd286258 100644 --- a/src/unix/sound.cpp +++ b/src/unix/sound.cpp @@ -340,6 +340,8 @@ bool wxSoundSyncOnlyAdaptor::Play(wxSoundData *data, unsigned flags, void wxSoundSyncOnlyAdaptor::Stop() { wxLogTrace(_T("sound"), _T("asking audio to stop")); + +#if wxUSE_THREADS // tell the player thread (if running) to stop playback ASAP: m_status.m_stopRequested = true; @@ -350,11 +352,16 @@ void wxSoundSyncOnlyAdaptor::Stop() m_mutexRightToPlay.Lock(); m_mutexRightToPlay.Unlock(); wxLogTrace(_T("sound"), _T("audio was stopped")); +#endif } bool wxSoundSyncOnlyAdaptor::IsPlaying() const { +#if wxUSE_THREADS return m_status.m_playing; +#else + return FALSE; +#endif }