Skip to content

audren: expose frame event. #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nx/include/switch/services/audren.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include "../types.h"
#include "../kernel/event.h"
#include "../audio/audio.h"
#include "../sf/service.h"

Expand Down Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions nx/source/services/audren.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down