Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ActiveAE: only convert gui sounds if format has changed

  • Loading branch information...
commit 38064102acebffaf2158900c29bb3c730b1f5685 1 parent aea8a8e
@FernetMenta FernetMenta authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
View
14 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -800,6 +800,7 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
bool initSink = false;
AEAudioFormat sinkInputFormat, inputFormat;
+ AEAudioFormat oldInternalFormat = m_internalFormat;
m_mode = MODE_PCM;
if (m_streams.empty())
@@ -1031,10 +1032,13 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
}
// reset gui sounds
- std::vector<CActiveAESound*>::iterator it;
- for (it = m_sounds.begin(); it != m_sounds.end(); ++it)
+ if (!CompareFormat(oldInternalFormat, m_internalFormat))
{
- (*it)->SetConverted(false);
+ std::vector<CActiveAESound*>::iterator it;
+ for (it = m_sounds.begin(); it != m_sounds.end(); ++it)
+ {
+ (*it)->SetConverted(false);
+ }
}
ClearDiscardedBuffers();
@@ -2252,7 +2256,11 @@ void CActiveAE::ResampleSounds()
for (it = m_sounds.begin(); it != m_sounds.end(); ++it)
{
if (!(*it)->IsConverted())
+ {
ResampleSound(*it);
+ // only do one sound, then yield to main loop
+ break;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.