audio_core: Flush stream when not playing anything
This commit is contained in:
parent
84b7a67ef1
commit
9ffbfeee26
6 changed files with 23 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue