diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2019-07-01 13:20:23 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2019-07-01 13:20:23 +0200 |
commit | b82b5e46e7c7ab259110fe49712f29220727d762 (patch) | |
tree | 7280d5ac099796391842ef2157d578378413e08b /src | |
parent | Merge pull request #2583 from FernandoS27/core-timing-safe (diff) | |
download | yuzu-b82b5e46e7c7ab259110fe49712f29220727d762.tar yuzu-b82b5e46e7c7ab259110fe49712f29220727d762.tar.gz yuzu-b82b5e46e7c7ab259110fe49712f29220727d762.tar.bz2 yuzu-b82b5e46e7c7ab259110fe49712f29220727d762.tar.lz yuzu-b82b5e46e7c7ab259110fe49712f29220727d762.tar.xz yuzu-b82b5e46e7c7ab259110fe49712f29220727d762.tar.zst yuzu-b82b5e46e7c7ab259110fe49712f29220727d762.zip |
Diffstat (limited to 'src')
-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..0c3d7df01 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) { info.play_state = PlayState::Paused; } } |