summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/audio/audin_u.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-09-29 05:42:50 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-10-02 05:38:59 +0200
commitfadcee14f8fca1b76b4ea48b1cfd136ccae8d182 (patch)
treea5787938bc73ff1b0b539e0945d3544d06a7d6d2 /src/core/hle/service/audio/audin_u.cpp
parentMerge pull request #7102 from Morph1984/remove-boxcat (diff)
downloadyuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.gz
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.bz2
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.lz
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.xz
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.tar.zst
yuzu-fadcee14f8fca1b76b4ea48b1cfd136ccae8d182.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/audio/audin_u.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp
index 570525019..840d1d883 100644
--- a/src/core/hle/service/audio/audin_u.cpp
+++ b/src/core/hle/service/audio/audin_u.cpp
@@ -12,7 +12,7 @@
namespace Service::Audio {
IAudioIn::IAudioIn(Core::System& system_)
- : ServiceFramework{system_, "IAudioIn"}, buffer_event{system_.Kernel()} {
+ : ServiceFramework{system_, "IAudioIn"}, service_context{system_, "IAudioIn"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "GetAudioInState"},
@@ -35,11 +35,12 @@ IAudioIn::IAudioIn(Core::System& system_)
RegisterHandlers(functions);
- Kernel::KAutoObject::Create(std::addressof(buffer_event));
- buffer_event.Initialize("IAudioIn:BufferEvent");
+ buffer_event = service_context.CreateEvent("IAudioIn:BufferEvent");
}
-IAudioIn::~IAudioIn() = default;
+IAudioIn::~IAudioIn() {
+ service_context.CloseEvent(buffer_event);
+}
void IAudioIn::Start(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_Audio, "(STUBBED) called");
@@ -53,7 +54,7 @@ void IAudioIn::RegisterBufferEvent(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
- rb.PushCopyObjects(buffer_event.GetReadableEvent());
+ rb.PushCopyObjects(buffer_event->GetReadableEvent());
}
void IAudioIn::AppendAudioInBufferAuto(Kernel::HLERequestContext& ctx) {