diff options
| author | 2018-09-12 18:07:16 +0100 | |
|---|---|---|
| committer | 2018-09-12 18:09:14 +0100 | |
| commit | 957ddab6796cb6f644c60993c3035d8bd9c0a398 (patch) | |
| tree | 17c3d0a96f47959a9c26d4f202003e5c2858fde3 /src/audio_core/stream.cpp | |
| parent | cubeb_sink: Downsample arbitrary number of channels (diff) | |
| download | yuzu-957ddab6796cb6f644c60993c3035d8bd9c0a398.tar.gz yuzu-957ddab6796cb6f644c60993c3035d8bd9c0a398.tar.xz yuzu-957ddab6796cb6f644c60993c3035d8bd9c0a398.zip | |
audio_core: Flush stream when not playing anything
Diffstat (limited to 'src/audio_core/stream.cpp')
| -rw-r--r-- | src/audio_core/stream.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index 49c6efc85..84dcdd98d 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp | |||
| @@ -73,6 +73,7 @@ static void VolumeAdjustSamples(std::vector<s16>& samples) { | |||
| 73 | void Stream::PlayNextBuffer() { | 73 | void Stream::PlayNextBuffer() { |
| 74 | if (!IsPlaying()) { | 74 | if (!IsPlaying()) { |
| 75 | // Ensure we are in playing state before playing the next buffer | 75 | // Ensure we are in playing state before playing the next buffer |
| 76 | sink_stream.Flush(); | ||
| 76 | return; | 77 | return; |
| 77 | } | 78 | } |
| 78 | 79 | ||
| @@ -83,6 +84,7 @@ void Stream::PlayNextBuffer() { | |||
| 83 | 84 | ||
| 84 | if (queued_buffers.empty()) { | 85 | if (queued_buffers.empty()) { |
| 85 | // No queued buffers - we are effectively paused | 86 | // No queued buffers - we are effectively paused |
| 87 | sink_stream.Flush(); | ||
| 86 | return; | 88 | return; |
| 87 | } | 89 | } |
| 88 | 90 | ||