]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/sound.cpp
support mac on little endian systems
[wxWidgets.git] / src / mac / carbon / sound.cpp
index a4870396eb5839ddef5a789b491958e2e322401f..a4704e9b1c56f1deace524e026875b71d35a223c 100644 (file)
@@ -9,10 +9,12 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "sound.h"
 #endif
 
+#include "wx/wxprec.h"
+
 #include "wx/object.h"
 #include "wx/string.h"
 #include "wx/log.h"
@@ -90,7 +92,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();
 
@@ -223,7 +225,7 @@ inline bool wxInitQT ()
         int nError;
         //-2093 no dll
             if ((nError = InitializeQTML(0)) != noErr)
-                wxLogSysError(wxString::Format("Couldn't Initialize Quicktime-%i", nError));
+                wxLogSysError(wxString::Format(wxT("Couldn't Initialize Quicktime-%i"), nError));
         #endif
         EnterMovies();
         return true;
@@ -420,8 +422,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 +478,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);
     }