summaryrefslogtreecommitdiffstats
path: root/src/audio_core/stream.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-23 20:31:12 +0200
committerGitHub <noreply@github.com>2021-06-23 20:31:12 +0200
commit809e5fd52317f0a925ca463eca85a0b67d744f9e (patch)
tree2be4647d9d8ca7b43643e2996a831b2c914c519b /src/audio_core/stream.cpp
parentMerge pull request #6518 from lioncash/func (diff)
parentImplement audout GetAudioOutPlayedSampleCount (diff)
downloadyuzu-809e5fd52317f0a925ca463eca85a0b67d744f9e.tar
yuzu-809e5fd52317f0a925ca463eca85a0b67d744f9e.tar.gz
yuzu-809e5fd52317f0a925ca463eca85a0b67d744f9e.tar.bz2
yuzu-809e5fd52317f0a925ca463eca85a0b67d744f9e.tar.lz
yuzu-809e5fd52317f0a925ca463eca85a0b67d744f9e.tar.xz
yuzu-809e5fd52317f0a925ca463eca85a0b67d744f9e.tar.zst
yuzu-809e5fd52317f0a925ca463eca85a0b67d744f9e.zip
Diffstat (limited to '')
-rw-r--r--src/audio_core/stream.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp
index ad6c587c2..5a30f55a7 100644
--- a/src/audio_core/stream.cpp
+++ b/src/audio_core/stream.cpp
@@ -107,9 +107,12 @@ void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) {
active_buffer = queued_buffers.front();
queued_buffers.pop();
- VolumeAdjustSamples(active_buffer->GetSamples(), game_volume);
+ auto& samples = active_buffer->GetSamples();
- sink_stream.EnqueueSamples(GetNumChannels(), active_buffer->GetSamples());
+ VolumeAdjustSamples(samples, game_volume);
+
+ sink_stream.EnqueueSamples(GetNumChannels(), samples);
+ played_samples += samples.size();
const auto buffer_release_ns = GetBufferReleaseNS(*active_buffer);