No real changes, just get rid of a variable in wxOSX wxSound code.
Don't define a variable which is used exactly once, testing for the async flag
directly is just as, or even more, readable and shorter.
(this is a backport of 605149ed07
from master)
This commit is contained in:
committed by
Vadim Zeitlin
parent
7d15904e1a
commit
37f97729c6
@@ -108,13 +108,11 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags)
|
|||||||
|
|
||||||
AudioServicesAddSystemSoundCompletion( m_soundID, CFRunLoopGetCurrent(), NULL, wxOSXAudioToolboxSoundData::CompletionCallback, (void *) this );
|
AudioServicesAddSystemSoundCompletion( m_soundID, CFRunLoopGetCurrent(), NULL, wxOSXAudioToolboxSoundData::CompletionCallback, (void *) this );
|
||||||
|
|
||||||
bool sync = !(flags & wxSOUND_ASYNC);
|
|
||||||
|
|
||||||
m_playing = true;
|
m_playing = true;
|
||||||
|
|
||||||
AudioServicesPlaySystemSound(m_soundID);
|
AudioServicesPlaySystemSound(m_soundID);
|
||||||
|
|
||||||
if ( sync )
|
if ( !(flags & wxSOUND_ASYNC) )
|
||||||
{
|
{
|
||||||
while ( m_playing )
|
while ( m_playing )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user