Mixer: Return actual number of samples mixed into buffer from MixerFifo::Mix

No code in the codebase currently depends on the return value of this function.
This commit is contained in:
MerryMage 2017-04-10 16:58:55 +01:00
parent 8ff26a6eda
commit 5b81f2a31d

View File

@ -88,6 +88,9 @@ unsigned int CMixer::MixerFifo::Mix(short* samples, unsigned int numSamples,
m_frac &= 0xffff;
}
// Actual number of samples written to the buffer without padding.
unsigned int actual_sample_count = currentSample / 2;
// Padding
short s[2];
s[0] = Common::swap16(m_buffer[(indexR - 1) & INDEX_MASK]);
@ -106,7 +109,7 @@ unsigned int CMixer::MixerFifo::Mix(short* samples, unsigned int numSamples,
// Flush cached variable
m_indexR.store(indexR);
return numSamples;
return actual_sample_count;
}
unsigned int CMixer::Mix(short* samples, unsigned int num_samples, bool consider_framelimit)