]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/sound.cpp
Disable a sporadically failing check in wxBitmapComboBox unit test.
[wxWidgets.git] / src / osx / core / sound.cpp
index 13ba208036b569a5923765a00d5d6557f160d3b4..aef9161af2ef9b3d6b435f1fed99b275ec320630 100644 (file)
@@ -38,21 +38,21 @@ public:
     wxOSXAudioToolboxSoundData(const wxString& fileName);
 
     ~wxOSXAudioToolboxSoundData();
     wxOSXAudioToolboxSoundData(const wxString& fileName);
 
     ~wxOSXAudioToolboxSoundData();
-    
+
     virtual bool Play(unsigned flags);
 
     virtual void DoStop();
 protected:
     static void CompletionCallback(SystemSoundID  mySSID, void * soundRef);
     void SoundCompleted();
     virtual bool Play(unsigned flags);
 
     virtual void DoStop();
 protected:
     static void CompletionCallback(SystemSoundID  mySSID, void * soundRef);
     void SoundCompleted();
-    
-    SystemSoundID m_soundID;    
+
+    SystemSoundID m_soundID;
     wxString m_sndname; //file path
 };
 
 wxOSXAudioToolboxSoundData::wxOSXAudioToolboxSoundData(const wxString& fileName) :
     m_soundID(NULL)
     wxString m_sndname; //file path
 };
 
 wxOSXAudioToolboxSoundData::wxOSXAudioToolboxSoundData(const wxString& fileName) :
     m_soundID(NULL)
-{                                            
+{
     m_sndname = fileName;
 }
 
     m_sndname = fileName;
 }
 
@@ -66,9 +66,9 @@ wxOSXAudioToolboxSoundData::CompletionCallback(SystemSoundID WXUNUSED(mySSID),
                                                void * soundRef)
 {
     wxOSXAudioToolboxSoundData* data = (wxOSXAudioToolboxSoundData*) soundRef;
                                                void * soundRef)
 {
     wxOSXAudioToolboxSoundData* data = (wxOSXAudioToolboxSoundData*) soundRef;
-    
+
     data->SoundCompleted();
     data->SoundCompleted();
-    
+
     if (data->IsMarkedForDeletion())
         delete data;
 }
     if (data->IsMarkedForDeletion())
         delete data;
 }
@@ -79,10 +79,10 @@ void wxOSXAudioToolboxSoundData::SoundCompleted()
     {
         if (m_flags & wxSOUND_LOOP)
             AudioServicesPlaySystemSound(m_soundID);
     {
         if (m_flags & wxSOUND_LOOP)
             AudioServicesPlaySystemSound(m_soundID);
-        else 
+        else
             Stop();
     }
             Stop();
     }
-    else 
+    else
     {
         Stop();
         CFRunLoopStop(CFRunLoopGetCurrent());
     {
         Stop();
         CFRunLoopStop(CFRunLoopGetCurrent());
@@ -96,7 +96,7 @@ void wxOSXAudioToolboxSoundData::DoStop()
     {
         AudioServicesDisposeSystemSoundID (m_soundID);
         m_soundID = NULL;
     {
         AudioServicesDisposeSystemSoundID (m_soundID);
         m_soundID = NULL;
-        
+
         wxSound::SoundStopped(this);
     }
 }
         wxSound::SoundStopped(this);
     }
 }
@@ -106,7 +106,7 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags)
     Stop();
 
     m_flags = flags;
     Stop();
 
     m_flags = flags;
-    
+
     wxCFRef<CFMutableStringRef> cfMutableString(CFStringCreateMutableCopy(NULL, 0, wxCFStringRef(m_sndname)));
     CFStringNormalize(cfMutableString,kCFStringNormalizationFormD);
     wxCFRef<CFURLRef> url(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kCFURLPOSIXPathStyle, false));
     wxCFRef<CFMutableStringRef> cfMutableString(CFStringCreateMutableCopy(NULL, 0, wxCFStringRef(m_sndname)));
     CFStringNormalize(cfMutableString,kCFStringNormalizationFormD);
     wxCFRef<CFURLRef> url(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kCFURLPOSIXPathStyle, false));
@@ -120,16 +120,16 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags)
 
     if ( sync )
     {
 
     if ( sync )
     {
-        while( m_soundID ) 
+        while( m_soundID )
         {
             CFRunLoopRun();
         }
     }
         {
             CFRunLoopRun();
         }
     }
-            
+
     return true;
 }
 
     return true;
 }
 
-bool wxSound::Create(int WXUNUSED(size), const wxByte* WXUNUSED(data))
+bool wxSound::Create(size_t WXUNUSED(size), const void* WXUNUSED(data))
 {
     wxFAIL_MSG( "not implemented" );
 
 {
     wxFAIL_MSG( "not implemented" );
 
@@ -139,7 +139,7 @@ bool wxSound::Create(int WXUNUSED(size), const wxByte* WXUNUSED(data))
 bool wxSound::Create(const wxString& fileName, bool isResource)
 {
     wxCHECK_MSG( !isResource, false, "not implemented" );
 bool wxSound::Create(const wxString& fileName, bool isResource)
 {
     wxCHECK_MSG( !isResource, false, "not implemented" );
-    
+
     m_data = new wxOSXAudioToolboxSoundData(fileName);
     return true;
 }
     m_data = new wxOSXAudioToolboxSoundData(fileName);
     return true;
 }