]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/sound.cpp
fix for non-quartz branch
[wxWidgets.git] / src / mac / carbon / sound.cpp
index f165552bf8b3680fa5b563d12fdf57fa226d8e49..6533416d1fd24de3532e6e4853f2df3f72fdaf1b 100644 (file)
@@ -9,10 +9,12 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "sound.h"
 #endif
 
 #pragma implementation "sound.h"
 #endif
 
+#include "wx/wxprec.h"
+
 #include "wx/object.h"
 #include "wx/string.h"
 #include "wx/log.h"
 #include "wx/object.h"
 #include "wx/string.h"
 #include "wx/log.h"
@@ -420,8 +422,10 @@ bool wxSound::DoPlay(unsigned flags) const
                 int nError;
                 if ((nError = NativePathNameToFSSpec ((char*) m_sndname.c_str(), &sfFile, 0)) != noErr)
                 {
                 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));
                     wxLogSysError(wxString::Format(wxT("File:%s does not exist\nError:%i"),
                                     m_sndname.c_str(), nError));
+*/
                     return false;
                 }
 #endif
                     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
         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))
         while (!IsMovieDone(movie))
-            MoviesTask(movie, 0);
+            MoviesTask(movie, 1);
 
         DisposeMovie(movie);
     }
 
         DisposeMovie(movie);
     }