diff options
author | bunnei <bunneidev@gmail.com> | 2021-01-31 10:38:57 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-02-05 23:03:32 +0100 |
commit | ff3c7c068b926399513bf7328c22e224ab0b53d6 (patch) | |
tree | c2a5d9f80ecf551659daa410cc384b1792eff31d /src/core/hle/service/audio/audout_u.cpp | |
parent | hle: kernel: Implement KEvent. (diff) | |
download | yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.gz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.bz2 yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.lz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.xz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.zst yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.zip |
Diffstat (limited to 'src/core/hle/service/audio/audout_u.cpp')
-rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 3c60ec43d..5ed9cb20e 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -14,6 +14,7 @@ #include "core/core.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/hle_ipc.h" +#include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_readable_event.h" #include "core/hle/kernel/k_writable_event.h" #include "core/hle/kernel/kernel.h" @@ -66,13 +67,13 @@ public: RegisterHandlers(functions); // This is the event handle used to check if the audio buffer was released - buffer_event = - Kernel::KWritableEvent::CreateEventPair(system.Kernel(), "IAudioOutBufferReleased"); + buffer_event = Kernel::KEvent::Create(system.Kernel(), "IAudioOutBufferReleased"); + buffer_event->Initialize(); stream = audio_core.OpenStream(system.CoreTiming(), audio_params.sample_rate, audio_params.channel_count, std::move(unique_name), [this] { const auto guard = LockService(); - buffer_event.writable->Signal(); + buffer_event->GetWritableEvent()->Signal(); }); } @@ -125,7 +126,7 @@ private: IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(buffer_event.readable); + rb.PushCopyObjects(buffer_event->GetReadableEvent()); } void AppendAudioOutBufferImpl(Kernel::HLERequestContext& ctx) { @@ -219,7 +220,7 @@ private: [[maybe_unused]] AudoutParams audio_params{}; /// This is the event handle used to check if the audio buffer was released - Kernel::EventPair buffer_event; + std::shared_ptr<Kernel::KEvent> buffer_event; Core::Memory::Memory& main_memory; }; |