// Modified by:
// Created: 25/10/98
// RCS-ID: $Id$
-// Copyright: (c) Julian Smart, Vaclav Slavik
+// Copyright: (c) Julian Smart, Open Source Applications Foundation
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#pragma hdrstop
#endif
-#if wxUSE_WAVE
+#if wxUSE_SOUND
#include <stdio.h>
#include <unistd.h>
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;
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
}
}
}
-bool wxSound::DoPlay(unsigned flags)
+bool wxSound::DoPlay(unsigned flags) const
{
- wxASSERT_MSG( (flags & wxSOUND_LOOP) == 0 || (flags & wxSOUND_ASYNC) != 0,
- _T("sound can only be looped asynchronously") );
wxCHECK_MSG( IsOk(), false, _T("Attempt to play invalid wave data") );
EnsureBackend();