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
This commit is contained in:
Robin Dunn
2004-07-22 00:42:52 +00:00
parent 448971f395
commit 11df1e8a33

View 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;
}