X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe8712b53ee1f27e278ea1b8b6246e9a89162402..5c7b506103cfc078a821860766e31c47d595e07f:/src/mac/carbon/sound.cpp?ds=sidebyside diff --git a/src/mac/carbon/sound.cpp b/src/mac/carbon/sound.cpp index b4ecddd1e0..b3ff384fc8 100644 --- a/src/mac/carbon/sound.cpp +++ b/src/mac/carbon/sound.cpp @@ -52,15 +52,7 @@ #endif #endif -#if defined __WXMAC__ && defined __DARWIN__/*TARGET_CARBON*/ -#ifdef __APPLE_CC__ #include -#else -#include -#endif -#else -#include -#endif //quicktime media layer only required for mac emulation on pc #ifndef __WXMAC__ @@ -79,6 +71,13 @@ 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 // ------------------------------------------------------------------ @@ -244,6 +243,8 @@ inline bool wxInitQT () } } +#endif + wxSound::wxSound() : m_hSnd(NULL), m_waveLength(0), m_pTimer(NULL), m_type(wxSound_NONE) { @@ -296,6 +297,8 @@ bool wxSound::DoPlay(unsigned flags) const { Stop(); +#if USE_QUICKTIME + Movie movie; switch(m_type) @@ -390,7 +393,7 @@ bool wxSound::DoPlay(unsigned flags) const 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); @@ -439,6 +442,7 @@ bool wxSound::DoPlay(unsigned flags) const DisposeMovie(movie); } +#endif return true; } @@ -460,10 +464,13 @@ void wxSound::Stop() 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