diff options
author | Zach Hilman <DarkLordZach@users.noreply.github.com> | 2019-07-08 15:35:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 15:35:42 +0200 |
commit | 618d8446abe9f5803bfe7d2440753672e866b448 (patch) | |
tree | 881149e2f9e318b9b1cd01d60a916e313dcdf922 | |
parent | Merge pull request #2657 from ogniK5377/npad-assignments (diff) | |
parent | addressed issue (diff) | |
download | yuzu-618d8446abe9f5803bfe7d2440753672e866b448.tar yuzu-618d8446abe9f5803bfe7d2440753672e866b448.tar.gz yuzu-618d8446abe9f5803bfe7d2440753672e866b448.tar.bz2 yuzu-618d8446abe9f5803bfe7d2440753672e866b448.tar.lz yuzu-618d8446abe9f5803bfe7d2440753672e866b448.tar.xz yuzu-618d8446abe9f5803bfe7d2440753672e866b448.tar.zst yuzu-618d8446abe9f5803bfe7d2440753672e866b448.zip |
-rw-r--r-- | src/audio_core/audio_renderer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp index 9a0939883..4882a6cd8 100644 --- a/src/audio_core/audio_renderer.cpp +++ b/src/audio_core/audio_renderer.cpp @@ -217,13 +217,15 @@ std::vector<s16> AudioRenderer::VoiceState::DequeueSamples(std::size_t sample_co if (offset == samples.size()) { offset = 0; - if (!wave_buffer.is_looping) { + if (!wave_buffer.is_looping && wave_buffer.buffer_sz) { SetWaveIndex(wave_index + 1); } - out_status.wave_buffer_consumed++; + if (wave_buffer.buffer_sz) { + out_status.wave_buffer_consumed++; + } - if (wave_buffer.end_of_stream) { + if (wave_buffer.end_of_stream || wave_buffer.buffer_sz == 0) { info.play_state = PlayState::Paused; } } |