diff options
author | Lioncash <mathew1800@gmail.com> | 2022-09-16 15:29:28 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2022-09-16 15:31:33 +0200 |
commit | a278fa6e2a8e06bf20b608ec6a79a53c32321d9b (patch) | |
tree | 9cfa8b7247494d8ea71754571fd0981eaffc5c74 /src/audio_core/device/device_session.cpp | |
parent | Merge pull request #8878 from Kelebek1/remove_pause (diff) | |
download | yuzu-a278fa6e2a8e06bf20b608ec6a79a53c32321d9b.tar yuzu-a278fa6e2a8e06bf20b608ec6a79a53c32321d9b.tar.gz yuzu-a278fa6e2a8e06bf20b608ec6a79a53c32321d9b.tar.bz2 yuzu-a278fa6e2a8e06bf20b608ec6a79a53c32321d9b.tar.lz yuzu-a278fa6e2a8e06bf20b608ec6a79a53c32321d9b.tar.xz yuzu-a278fa6e2a8e06bf20b608ec6a79a53c32321d9b.tar.zst yuzu-a278fa6e2a8e06bf20b608ec6a79a53c32321d9b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/device/device_session.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/audio_core/device/device_session.cpp b/src/audio_core/device/device_session.cpp index c71c3a376..6cde33f93 100644 --- a/src/audio_core/device/device_session.cpp +++ b/src/audio_core/device/device_session.cpp @@ -73,7 +73,7 @@ void DeviceSession::Stop() { } } -void DeviceSession::AppendBuffers(std::span<AudioBuffer> buffers) const { +void DeviceSession::AppendBuffers(std::span<const AudioBuffer> buffers) const { for (size_t i = 0; i < buffers.size(); i++) { Sink::SinkBuffer new_buffer{ .frames = buffers[i].size / (channel_count * sizeof(s16)), @@ -93,14 +93,14 @@ void DeviceSession::AppendBuffers(std::span<AudioBuffer> buffers) const { } } -void DeviceSession::ReleaseBuffer(AudioBuffer& buffer) const { +void DeviceSession::ReleaseBuffer(const AudioBuffer& buffer) const { if (type == Sink::StreamType::In) { auto samples{stream->ReleaseBuffer(buffer.size / sizeof(s16))}; system.Memory().WriteBlockUnsafe(buffer.samples, samples.data(), buffer.size); } } -bool DeviceSession::IsBufferConsumed(AudioBuffer& buffer) const { +bool DeviceSession::IsBufferConsumed(const AudioBuffer& buffer) const { return played_sample_count >= buffer.end_timestamp; } |