- // Plays the sound. flags are same flags as those passed to wxSound::Play
- virtual bool Play(wxSoundData *data, unsigned flags) = 0;
+ // Plays the sound. flags are same flags as those passed to wxSound::Play.
+ // The function should periodically check the value of
+ // status->m_stopRequested and terminate if it is set to true (it may
+ // be modified by another thread)
+ virtual bool Play(wxSoundData *data, unsigned flags,
+ volatile wxSoundPlaybackStatus *status) = 0;
+
+ // Stops playback (if something is played).
+ virtual void Stop() = 0;
+
+ // Returns true if the backend is playing anything at the moment.
+ // (This method is never called for backends that don't support async
+ // playback.)
+ virtual bool IsPlaying() const = 0;