X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fde6fcc9b551340a194ae4c726db5ab64b5c594..8403515064580b497986dcde81ac1b5b8845422f:/src/mac/wave.cpp

diff --git a/src/mac/wave.cpp b/src/mac/wave.cpp
index f0891a6546..01c7b9b035 100644
--- a/src/mac/wave.cpp
+++ b/src/mac/wave.cpp
@@ -17,6 +17,13 @@
 #include "wx/string.h"
 #include "wx/wave.h"
 
+#ifdef __WXMAC__
+#include "wx/mac/private.h"
+#ifndef __DARWIN__
+#include <Sound.h>
+#endif
+#endif
+
 wxWave::wxWave()
   : m_sndChan(0), m_hSnd(NULL), m_waveLength(0), m_isResource(true)
 {
@@ -31,9 +38,14 @@ wxWave::wxWave(const wxString& sFileName, bool isResource)
 
 wxWave::~wxWave()
 {
-    Free();
+    FreeData();
 }
 
+wxWave::wxWave(int size, const wxByte* data)
+  : m_sndChan(0), m_hSnd(NULL), m_waveLength(0), m_isResource(false)
+{
+    //TODO convert data
+}
 
 bool wxWave::Create(const wxString& fileName, bool isResource)
 {
@@ -136,7 +148,7 @@ bool wxWave::Play(bool async, bool looped) const
 	  
 	  hSnd = (SndListHandle) GetNamedResource('snd ',(const unsigned char *) lpSnd);
 
-	  if ((hSnd != NULL) && (SndPlay(m_sndChan, hSnd, async) == noErr))
+	  if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, async) == noErr))
 	    ret = true;
 	} 
 	
@@ -144,7 +156,7 @@ bool wxWave::Play(bool async, bool looped) const
 }
 
 
-bool wxWave::Free()
+bool wxWave::FreeData()
 {
 	bool ret = false;