diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-31 07:06:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 07:06:05 +0100 |
commit | 25d607f5f63929369fb74f386a920b69bb24f442 (patch) | |
tree | 9ee5a023f033d99561a0358c5c71aeecc92c9d64 /src/audio_core/audio_renderer.cpp | |
parent | Merge pull request #5263 from lioncash/uninit (diff) | |
parent | hle: kernel: service_thread: Make thread naming more consistent. (diff) | |
download | yuzu-25d607f5f63929369fb74f386a920b69bb24f442.tar yuzu-25d607f5f63929369fb74f386a920b69bb24f442.tar.gz yuzu-25d607f5f63929369fb74f386a920b69bb24f442.tar.bz2 yuzu-25d607f5f63929369fb74f386a920b69bb24f442.tar.lz yuzu-25d607f5f63929369fb74f386a920b69bb24f442.tar.xz yuzu-25d607f5f63929369fb74f386a920b69bb24f442.tar.zst yuzu-25d607f5f63929369fb74f386a920b69bb24f442.zip |
Diffstat (limited to 'src/audio_core/audio_renderer.cpp')
-rw-r--r-- | src/audio_core/audio_renderer.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp index 179560cd7..d2ce8c814 100644 --- a/src/audio_core/audio_renderer.cpp +++ b/src/audio_core/audio_renderer.cpp @@ -11,7 +11,6 @@ #include "audio_core/info_updater.h" #include "audio_core/voice_context.h" #include "common/logging/log.h" -#include "core/hle/kernel/writable_event.h" #include "core/memory.h" #include "core/settings.h" @@ -71,10 +70,9 @@ namespace { namespace AudioCore { AudioRenderer::AudioRenderer(Core::Timing::CoreTiming& core_timing, Core::Memory::Memory& memory_, AudioCommon::AudioRendererParameter params, - std::shared_ptr<Kernel::WritableEvent> buffer_event_, + Stream::ReleaseCallback&& release_callback, std::size_t instance_number) - : worker_params{params}, buffer_event{buffer_event_}, - memory_pool_info(params.effect_count + params.voice_count * 4), + : worker_params{params}, memory_pool_info(params.effect_count + params.voice_count * 4), voice_context(params.voice_count), effect_context(params.effect_count), mix_context(), sink_context(params.sink_count), splitter_context(), voices(params.voice_count), memory{memory_}, @@ -85,10 +83,9 @@ AudioRenderer::AudioRenderer(Core::Timing::CoreTiming& core_timing, Core::Memory params.num_splitter_send_channels); mix_context.Initialize(behavior_info, params.submix_count + 1, params.effect_count); audio_out = std::make_unique<AudioCore::AudioOut>(); - stream = - audio_out->OpenStream(core_timing, params.sample_rate, AudioCommon::STREAM_NUM_CHANNELS, - fmt::format("AudioRenderer-Instance{}", instance_number), - [=]() { buffer_event_->Signal(); }); + stream = audio_out->OpenStream( + core_timing, params.sample_rate, AudioCommon::STREAM_NUM_CHANNELS, + fmt::format("AudioRenderer-Instance{}", instance_number), std::move(release_callback)); audio_out->StartStream(stream); QueueMixedBuffer(0); |