Don't use timer inside wxSound in wxOSX/Cocoa.

The timer is only used by Carbon code, there is no need for it in Cocoa, so
don't complicate things by starting it unnecessarily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-04-12 22:56:17 +00:00
parent 48b21dee76
commit 5276dfa416
2 changed files with 23 additions and 4 deletions

View File

@@ -27,19 +27,25 @@ public :
virtual bool Play(unsigned int flags) = 0;
// stops the sound and deletes the optional timer
virtual void Stop();
// can be called by a timer for repeated tasks during playback
virtual void SoundTask();
// mark this to be deleted
virtual void MarkForDeletion();
virtual bool IsMarkedForDeletion() const { return m_markedForDeletion; }
// does the true work of stopping and cleaning up
virtual void DoStop() = 0;
#if wxOSX_USE_CARBON
// can be called by a timer for repeated tasks during playback
virtual void SoundTask();
protected :
void CreateAndStartTimer();
unsigned int m_flags;
wxSoundTimer* m_pTimer;
#endif // wxOSX_USE_CARBON
protected:
unsigned int m_flags;
bool m_markedForDeletion;
} ;