mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
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:
parent
8ff26a6eda
commit
5b81f2a31d
@ -88,6 +88,9 @@ unsigned int CMixer::MixerFifo::Mix(short* samples, unsigned int numSamples,
|
|||||||
m_frac &= 0xffff;
|
m_frac &= 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Actual number of samples written to the buffer without padding.
|
||||||
|
unsigned int actual_sample_count = currentSample / 2;
|
||||||
|
|
||||||
// Padding
|
// Padding
|
||||||
short s[2];
|
short s[2];
|
||||||
s[0] = Common::swap16(m_buffer[(indexR - 1) & INDEX_MASK]);
|
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
|
// Flush cached variable
|
||||||
m_indexR.store(indexR);
|
m_indexR.store(indexR);
|
||||||
|
|
||||||
return numSamples;
|
return actual_sample_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CMixer::Mix(short* samples, unsigned int num_samples, bool consider_framelimit)
|
unsigned int CMixer::Mix(short* samples, unsigned int num_samples, bool consider_framelimit)
|
||||||
|
Loading…
Reference in New Issue
Block a user