]> git.saurik.com Git - wxWidgets.git/commitdiff
wxSOUND_SYNC is zero so it can't be used in a
authorRobin Dunn <robin@alldunn.com>
Thu, 22 Jul 2004 00:42:52 +0000 (00:42 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 22 Jul 2004 00:42:52 +0000 (00:42 +0000)
(flags & wxSOUND_SYNC) test as it woudl always evaluate to false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/sound.cpp

index 19cd0450911816bc589bece219fa2ce195050aa1..17e46752a830d6bde04716da04a55e77c5582ade 100644 (file)
@@ -387,7 +387,13 @@ bool wxSound::DoPlay(unsigned flags) const
     //Start the movie!
     StartMovie(movie);
 
-    if (flags & wxSOUND_SYNC)
+    if (flags & wxSOUND_ASYNC)
+    {
+        //Start timer and play movie asyncronously
+        ((wxQTTimer*&)m_pTimer) = new wxQTTimer(movie, flags & wxSOUND_LOOP ? 1 : 0);
+        ((wxQTTimer*)m_pTimer)->Start(MOVIE_DELAY, wxTIMER_CONTINUOUS);
+    }
+    else
     {
         wxASSERT_MSG(!(flags & wxSOUND_LOOP), "Can't loop and play syncronously at the same time");
 
@@ -397,12 +403,6 @@ bool wxSound::DoPlay(unsigned flags) const
 
         DisposeMovie(movie);
     }
-    else
-    {
-        //Start timer and play movie asyncronously
-        ((wxQTTimer*&)m_pTimer) = new wxQTTimer(movie, flags & wxSOUND_LOOP ? 1 : 0);
-        ((wxQTTimer*)m_pTimer)->Start(MOVIE_DELAY, wxTIMER_CONTINUOUS);
-    }
 
     return true;
 }