diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-27 00:34:07 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-29 14:45:41 +0100 |
commit | ff610103b58b3e0dd39fafb539a1cc0bc0fae577 (patch) | |
tree | cbd54b09f9270f6f1d92a2f45a5ccdb307569093 /src/core/hle/service/audio/audout_u.cpp | |
parent | hle_ipc: Use event pair for SleepClientThread (diff) | |
download | yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.gz yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.bz2 yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.lz yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.xz yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.zst yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.zip |
Diffstat (limited to 'src/core/hle/service/audio/audout_u.cpp')
-rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 2ee9bc273..b5012e579 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -13,8 +13,10 @@ #include "common/swap.h" #include "core/core.h" #include "core/hle/ipc_helpers.h" -#include "core/hle/kernel/event.h" #include "core/hle/kernel/hle_ipc.h" +#include "core/hle/kernel/kernel.h" +#include "core/hle/kernel/readable_event.h" +#include "core/hle/kernel/writable_event.h" #include "core/hle/service/audio/audout_u.h" #include "core/memory.h" @@ -67,8 +69,8 @@ public: // This is the event handle used to check if the audio buffer was released auto& kernel = Core::System::GetInstance().Kernel(); - buffer_event = - Kernel::Event::Create(kernel, Kernel::ResetType::Sticky, "IAudioOutBufferReleased"); + buffer_event = Kernel::WritableEvent::CreateRegisteredEventPair( + kernel, Kernel::ResetType::Sticky, "IAudioOutBufferReleased"); stream = audio_core.OpenStream(audio_params.sample_rate, audio_params.channel_count, std::move(unique_name), [=]() { buffer_event->Signal(); }); @@ -121,7 +123,9 @@ private: IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(buffer_event); + const auto& event{ + Core::System::GetInstance().Kernel().FindNamedEvent("IAudioOutBufferReleased")}; + rb.PushCopyObjects(event->second); } void AppendAudioOutBufferImpl(Kernel::HLERequestContext& ctx) { @@ -188,7 +192,7 @@ private: AudoutParams audio_params{}; /// This is the evend handle used to check if the audio buffer was released - Kernel::SharedPtr<Kernel::Event> buffer_event; + Kernel::SharedPtr<Kernel::WritableEvent> buffer_event; }; void AudOutU::ListAudioOutsImpl(Kernel::HLERequestContext& ctx) { |