To support playing async sounds on the stack on Mac, do not delete the wxSoundData when its wxSound object is destroyed if it's in the queue of sounds to be played. Instead, mark it to be deleted and delete it after it has played.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -100,6 +100,9 @@ void wxOSXSoundManagerSoundData::DoStop()
|
||||
m_pSndChannel = NULL;
|
||||
wxSound::SoundStopped(this);
|
||||
}
|
||||
|
||||
if (IsMarkedForDeletion())
|
||||
delete this;
|
||||
}
|
||||
|
||||
bool wxOSXSoundManagerSoundData::Play(unsigned flags)
|
||||
|
||||
Reference in New Issue
Block a user