X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d3ef2255e608c68954a61323176856332086368..6270539bcf24f2ec32150a09f8aad383f5de0671:/src/mac/carbon/sound.cpp diff --git a/src/mac/carbon/sound.cpp b/src/mac/carbon/sound.cpp index f165552bf8..9af87b7e0e 100644 --- a/src/mac/carbon/sound.cpp +++ b/src/mac/carbon/sound.cpp @@ -9,9 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "sound.h" -#endif +#include "wx/wxprec.h" #include "wx/object.h" #include "wx/string.h" @@ -43,9 +41,11 @@ #ifdef __WXMAC__ #include "wx/mac/uma.h" +#ifndef __DARWIN__ #include #include #endif +#endif #if defined __WXMAC__ && defined __DARWIN__/*TARGET_CARBON*/ #ifdef __APPLE_CC__ @@ -62,7 +62,11 @@ #include #endif +#ifndef __DARWIN__ #include +#else +#include +#endif //Time between timer calls #define MOVIE_DELAY 100 @@ -90,7 +94,7 @@ public: DisposeMovie(m_movie); Stop(); - //Note that ExitMovies() is not neccessary, but + //Note that ExitMovies() is not necessary, but //the docs are fuzzy on whether or not TerminateQTML is ExitMovies(); @@ -420,8 +424,10 @@ bool wxSound::DoPlay(unsigned flags) const int nError; if ((nError = NativePathNameToFSSpec ((char*) m_sndname.c_str(), &sfFile, 0)) != noErr) { +/* wxLogSysError(wxString::Format(wxT("File:%s does not exist\nError:%i"), m_sndname.c_str(), nError)); +*/ return false; } #endif @@ -474,8 +480,10 @@ bool wxSound::DoPlay(unsigned flags) const wxASSERT_MSG(!(flags & wxSOUND_LOOP), wxT("Can't loop and play syncronously at the same time")); //Play movie until it ends, then exit + //Note that due to quicktime caching this may not always + //work 100% correctly while (!IsMovieDone(movie)) - MoviesTask(movie, 0); + MoviesTask(movie, 1); DisposeMovie(movie); }