Skip to content

Commit

Permalink
Merge pull request xbmc#4295 from KeyserSoze1/master
Browse files Browse the repository at this point in the history
Fixed mute not working for non-SSE enabled builds
  • Loading branch information
t-nelson committed Feb 28, 2014
2 parents 022952e + 45dcd3a commit 583d341
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2055,16 +2055,17 @@ void CActiveAE::Deamplify(CSoundPacket &dstSample)
{
float *buffer;
int nb_floats = dstSample.nb_samples * dstSample.config.channels / dstSample.planes;
float volume = m_muted ? 0.0f : m_volume;

for(int j=0; j<dstSample.planes; j++)
{
buffer = (float*)dstSample.data[j];
#ifdef __SSE__
CAEUtil::SSEMulArray(buffer, m_muted ? 0.0 : m_volume, nb_floats);
CAEUtil::SSEMulArray(buffer, volume, nb_floats);
#else
float *fbuffer = buffer;
for (int i = 0; i < nb_floats; i++)
*fbuffer++ *= m_volume;
*fbuffer++ *= volume;
#endif
}
}
Expand Down

0 comments on commit 583d341

Please sign in to comment.