Skip to content

Commit

Permalink
don't hit iterators during RunStreamStage unless we have to - win32's…
Browse files Browse the repository at this point in the history
… debug stl grabs global locks which makes debugging painful
  • Loading branch information
Jonathan Marshall committed May 24, 2012
1 parent 646d2d4 commit 3947a6f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,17 +1101,19 @@ unsigned int CSoftAE::RunRawStreamStage(unsigned int channelCount, void *out, bo

unsigned int CSoftAE::RunStreamStage(unsigned int channelCount, void *out, bool &restart)
{
StreamList resumeStreams;
static StreamList::iterator itt;

float *dst = (float*)out;
unsigned int mixed = 0;

/* identify the master stream */
CSingleLock streamLock(m_streamLock);

/* no point doing anything if we have no streams */
if (m_playingStreams.empty())
return mixed;

/* mix in any running streams */
for (itt = m_playingStreams.begin(); itt != m_playingStreams.end(); ++itt)
StreamList resumeStreams;
for (StreamList::iterator itt = m_playingStreams.begin(); itt != m_playingStreams.end(); ++itt)
{
CSoftAEStream *stream = *itt;

Expand Down

0 comments on commit 3947a6f

Please sign in to comment.