X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe8712b53ee1f27e278ea1b8b6246e9a89162402..888dde65f43d5f57e8fb2028b27191cca1741403:/src/mac/carbon/sound.cpp?ds=sidebyside diff --git a/src/mac/carbon/sound.cpp b/src/mac/carbon/sound.cpp index b4ecddd1e0..365b1e42a2 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) @@ -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