#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)
{
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)
{
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;
}
}
-bool wxWave::Free()
+bool wxWave::FreeData()
{
bool ret = false;