X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f156e20c8e21594f901bfce15db4459208ec9571..20fa338c4120e89356d31e46e9f8c97e0bca67c7:/src/unix/sound.cpp?ds=inline 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 }