diff --git a/src/osx/core/sound.cpp b/src/osx/core/sound.cpp index 327de35cde..d96ca0f9a3 100644 --- a/src/osx/core/sound.cpp +++ b/src/osx/core/sound.cpp @@ -108,13 +108,11 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags) AudioServicesAddSystemSoundCompletion( m_soundID, CFRunLoopGetCurrent(), NULL, wxOSXAudioToolboxSoundData::CompletionCallback, (void *) this ); - bool sync = !(flags & wxSOUND_ASYNC); - m_playing = true; AudioServicesPlaySystemSound(m_soundID); - if ( sync ) + if ( !(flags & wxSOUND_ASYNC) ) { while ( m_playing ) {