summaryrefslogtreecommitdiff
path: root/src/audio_core
diff options
context:
space:
mode:
authorGravatar liamwhite2024-02-19 10:50:45 -0500
committerGravatar GitHub2024-02-19 10:50:45 -0500
commitc9ef2e26ca82cacc44998727d704f4b77ee88591 (patch)
tree43a5699123e4930560fc5016faac7efb15b63f4e /src/audio_core
parentMerge pull request #13006 from liamwhite/a-hat-in-vram (diff)
parentscope_exit: Make constexpr (diff)
downloadyuzu-c9ef2e26ca82cacc44998727d704f4b77ee88591.tar.gz
yuzu-c9ef2e26ca82cacc44998727d704f4b77ee88591.tar.xz
yuzu-c9ef2e26ca82cacc44998727d704f4b77ee88591.zip
Merge pull request #13080 from FearlessTobi/scope-exit
scope_exit: Make constexpr
Diffstat (limited to 'src/audio_core')
-rw-r--r--src/audio_core/sink/cubeb_sink.cpp4
-rw-r--r--src/audio_core/sink/sink_stream.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/audio_core/sink/cubeb_sink.cpp b/src/audio_core/sink/cubeb_sink.cpp
index d97ca2a40..49efae8e3 100644
--- a/src/audio_core/sink/cubeb_sink.cpp
+++ b/src/audio_core/sink/cubeb_sink.cpp
@@ -357,7 +357,9 @@ bool IsCubebSuitable() {
357 return false; 357 return false;
358 } 358 }
359 359
360 SCOPE_EXIT({ cubeb_destroy(ctx); }); 360 SCOPE_EXIT {
361 cubeb_destroy(ctx);
362 };
361 363
362#ifdef _WIN32 364#ifdef _WIN32
363 if (SUCCEEDED(com_init_result)) { 365 if (SUCCEEDED(com_init_result)) {
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp
index c047b0668..0a98eb31e 100644
--- a/src/audio_core/sink/sink_stream.cpp
+++ b/src/audio_core/sink/sink_stream.cpp
@@ -20,10 +20,10 @@
20namespace AudioCore::Sink { 20namespace AudioCore::Sink {
21 21
22void SinkStream::AppendBuffer(SinkBuffer& buffer, std::span<s16> samples) { 22void SinkStream::AppendBuffer(SinkBuffer& buffer, std::span<s16> samples) {
23 SCOPE_EXIT({ 23 SCOPE_EXIT {
24 queue.enqueue(buffer); 24 queue.enqueue(buffer);
25 ++queued_buffers; 25 ++queued_buffers;
26 }); 26 };
27 27
28 if (type == StreamType::In) { 28 if (type == StreamType::In) {
29 return; 29 return;