diff --git a/nx/include/switch/services/audren.h b/nx/include/switch/services/audren.h index 3af6ad534..cfbfa23a0 100644 --- a/nx/include/switch/services/audren.h +++ b/nx/include/switch/services/audren.h @@ -7,6 +7,7 @@ #pragma once #include "../types.h" +#include "../kernel/event.h" #include "../audio/audio.h" #include "../sf/service.h" @@ -324,6 +325,9 @@ void audrenExit(void); /// Gets the Service object for IAudioRenderer. Service* audrenGetServiceSession_AudioRenderer(void); +/// Returns event that is signalled on new frame (autoclear=true). +Event* audrenGetFrameEvent(void); + void audrenWaitFrame(void); Result audrenGetState(u32* out_state); Result audrenRequestUpdateAudioRenderer(const void* in_param_buf, size_t in_param_buf_size, void* out_param_buf, size_t out_param_buf_size, void* perf_buf, size_t perf_buf_size); diff --git a/nx/source/services/audren.c b/nx/source/services/audren.c index 07dda7e26..688291b77 100644 --- a/nx/source/services/audren.c +++ b/nx/source/services/audren.c @@ -111,6 +111,10 @@ Service* audrenGetServiceSession_AudioRenderer(void) { return &g_audrenIAudioRenderer; } +Event* audrenGetFrameEvent(void) { + return &g_audrenEvent; +} + static Result _audrenCmdGetHandle(Service* srv, Handle* handle_out, u32 cmd_id) { return serviceDispatch(srv, cmd_id, .out_handle_attrs = { SfOutHandleAttr_HipcCopy },