audio_core: Flush stream when not playing anything

This commit is contained in:
MerryMage 2018-09-12 18:07:16 +01:00
parent 84b7a67ef1
commit 9ffbfeee26
6 changed files with 23 additions and 0 deletions

View file

@ -73,6 +73,7 @@ static void VolumeAdjustSamples(std::vector<s16>& samples) {
void Stream::PlayNextBuffer() {
if (!IsPlaying()) {
// Ensure we are in playing state before playing the next buffer
sink_stream.Flush();
return;
}
@ -83,6 +84,7 @@ void Stream::PlayNextBuffer() {
if (queued_buffers.empty()) {
// No queued buffers - we are effectively paused
sink_stream.Flush();
return;
}