#endif
#endif
-#if defined __WXMAC__ && defined __DARWIN__/*TARGET_CARBON*/
-#ifdef __APPLE_CC__
#include <Carbon/Carbon.h>
-#else
-#include <Carbon.h>
-#endif
-#else
-#include <Sound.h>
-#endif
//quicktime media layer only required for mac emulation on pc
#ifndef __WXMAC__
static wxTimer* lastSoundTimer=NULL;
static bool lastSoundIsPlaying=false;
+#if !defined(__LP64__)
+#define USE_QUICKTIME 1
+#else
+#define USE_QUICKTIME 0
+#endif
+
+#if USE_QUICKTIME
// ------------------------------------------------------------------
// wxQTTimer - Handle Asyncronous Playing
// ------------------------------------------------------------------
}
}
+#endif
+
wxSound::wxSound()
: m_hSnd(NULL), m_waveLength(0), m_pTimer(NULL), m_type(wxSound_NONE)
{
{
Stop();
+#if USE_QUICKTIME
+
Movie movie;
switch(m_type)
Handle dataRef = NULL;
OSType dataRefType;
- err = QTNewDataReferenceFromFullPathCFString(wxMacCFStringHolder(m_sndname,wxLocale::GetSystemEncoding()),
+ err = QTNewDataReferenceFromFullPathCFString(wxCFStringRef(m_sndname,wxLocale::GetSystemEncoding()),
(UInt32)kQTNativeDefaultPathStyle, 0, &dataRef, &dataRefType);
wxASSERT(err == noErr);
DisposeMovie(movie);
}
+#endif
return true;
}
void* wxSound::GetHandle()
{
+#if USE_QUICKTIME
if(m_type == wxSound_RESOURCE)
return (void*) ((wxSMTimer*)m_pTimer)->GetChannel();
return (void*) ((wxQTTimer*) m_pTimer)->GetMovie();
+#endif
+ return NULL;
}
#endif //wxUSE_SOUND