fixing comments, making sure sound always gets the completion call in the same thread as it was created, otherwise iphone sometimes crashes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: src/osx/carbon/sound.cpp
|
// Name: src/osx/core/sound.cpp
|
||||||
// Purpose: wxSound class implementation: optional
|
// Purpose: wxSound class implementation using AudioToolbox
|
||||||
// Author: Ryan Norton
|
// Author: Stefan Csomor
|
||||||
// Modified by: Stefan Csomor
|
// Modified by: Stefan Csomor
|
||||||
// Created: 1998-01-01
|
// Created: 2009-01-01
|
||||||
// RCS-ID: $Id: sound.cpp 61475 2009-07-20 16:47:54Z VZ $
|
// RCS-ID: $Id: sound.cpp 61475 2009-07-20 16:47:54Z VZ $
|
||||||
// Copyright: (c) Ryan Norton
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags)
|
|||||||
wxCFRef<CFURLRef> url(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kCFURLPOSIXPathStyle, false));
|
wxCFRef<CFURLRef> url(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kCFURLPOSIXPathStyle, false));
|
||||||
|
|
||||||
AudioServicesCreateSystemSoundID(url, &m_soundID);
|
AudioServicesCreateSystemSoundID(url, &m_soundID);
|
||||||
AudioServicesAddSystemSoundCompletion( m_soundID, NULL, NULL, wxOSXAudioToolboxSoundData::CompletionCallback, (void *) this );
|
AudioServicesAddSystemSoundCompletion( m_soundID, CFRunLoopGetCurrent(), NULL, wxOSXAudioToolboxSoundData::CompletionCallback, (void *) this );
|
||||||
|
|
||||||
bool sync = !(flags & wxSOUND_ASYNC);
|
bool sync = !(flags & wxSOUND_ASYNC);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user