From: Robin Dunn Date: Thu, 22 Jul 2004 00:42:52 +0000 (+0000) Subject: wxSOUND_SYNC is zero so it can't be used in a X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/11df1e8a334a8ba81a3514994571be28613a66e9 wxSOUND_SYNC is zero so it can't be used in a (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 --- diff --git a/src/mac/carbon/sound.cpp b/src/mac/carbon/sound.cpp index 19cd045091..17e46752a8 100644 --- a/src/mac/carbon/sound.cpp +++ b/src/mac/carbon/sound.cpp @@ -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; }