]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing and completing iPhone sound
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 14 Sep 2009 13:07:23 +0000 (13:07 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 14 Sep 2009 13:07:23 +0000 (13:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/carbon/chkconf.h
include/wx/osx/cocoa/chkconf.h
include/wx/osx/iphone/chkconf.h
src/osx/core/sound.cpp

index 5397ae1656eb6921468b8f853712b7fca65550d8..7f1c9784a3da25923ac2969564859bdf1f28e640 100644 (file)
@@ -53,7 +53,7 @@
  */
 
 #define wxOSX_USE_QUICKTIME 1
-#define wXOSX_USE_AUDIOTOOLBOX 0
+#define wxOSX_USE_AUDIOTOOLBOX 0
 
 #endif
     /* _WX_OSX_CARBON_CHKCONF_H_ */
index aa048e9263b406c4046257745d107bc0a9b22e1a..691acd25ae2f9e5e650f1e11eba20366b8f79a32 100644 (file)
 
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
     #define wxOSX_USE_QUICKTIME 0
-    #define wXOSX_USE_AUDIOTOOLBOX 1
+    #define wxOSX_USE_AUDIOTOOLBOX 1
 #else // platform < 10.5
     #define wxOSX_USE_QUICKTIME 1
-    #define wXOSX_USE_AUDIOTOOLBOX 0
+    #define wxOSX_USE_AUDIOTOOLBOX 0
 #endif
 
 /*
index 72068e693ef7cd665454f608c768577d5ade28a3..5810f718593106c2a6683995ea32f91cb1bdb0ed 100644 (file)
@@ -25,7 +25,7 @@
 #define wxHAS_OPENGL_ES
 
 #define wxOSX_USE_QUICKTIME 0
-#define wXOSX_USE_AUDIOTOOLBOX 1
+#define wxOSX_USE_AUDIOTOOLBOX 1
 
 /*
  * turning off capabilities that don't work under iphone yet
index 79ba5ffd621b15aa47dd93cb7e81e2601ba9625e..066dcebd6c67ba29e554423408bd023535846a9b 100644 (file)
 
 #if wxUSE_SOUND
 
-#if wxOSX_USE_AUDIOTOOLBOX
-
 #include "wx/sound.h"
 
+#if wxOSX_USE_AUDIOTOOLBOX
+
 #ifndef WX_PRECOMP
     #include "wx/object.h"
     #include "wx/string.h"
 
 #include "wx/file.h"
 
+#include "wx/osx/private.h"
+
+#include <AudioToolbox/AudioToolbox.h>
+
 class wxOSXAudioToolboxSoundData : public wxSoundData
 {
 public:
@@ -87,7 +91,7 @@ void wxOSXAudioToolboxSoundData::DoStop()
     }
 }
 
-bool wxOSXAudioToolboxSoundData::DoPlay(unsigned flags) const
+bool wxOSXAudioToolboxSoundData::Play(unsigned flags)
 {
     Stop();
 
@@ -115,6 +119,21 @@ bool wxOSXAudioToolboxSoundData::DoPlay(unsigned flags) const
     return true;
 }
 
+bool wxSound::Create(int size, const wxByte* data)
+{
+    return false;
+}
+
+bool wxSound::Create(const wxString& fileName, bool isResource)
+{
+    if ( isResource )
+        return false;
+    
+    
+    m_data = new wxOSXAudioToolboxSoundData(fileName);
+    return true;
+}
+
 #endif // wxOSX_USE_AUDIOTOOLBOX
 
 #endif //wxUSE_SOUND