From d4c586bdb88ecee6dbb8f8300c8a8ad4625832bd Mon Sep 17 00:00:00 2001 From: Mike H Date: Tue, 13 Feb 2018 21:38:02 +0000 Subject: [PATCH] Add functions for state retrieval --- nx/include/switch/services/audout.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nx/include/switch/services/audout.h b/nx/include/switch/services/audout.h index ed73fc74..952f1d2f 100644 --- a/nx/include/switch/services/audout.h +++ b/nx/include/switch/services/audout.h @@ -23,9 +23,9 @@ typedef enum { AudioOutState_Stopped = 1, } AudioOutState; +/// audio output buffer format typedef struct AudioOutBuffer AudioOutBuffer; -/// audio output buffer format struct AudioOutBuffer { AudioOutBuffer* next; ///< Next buffer. @@ -47,3 +47,9 @@ Result audoutAppendAudioOutBuffer(AudioOutBuffer *Buffer); Result audoutRegisterBufferEvent(Handle *BufferEvent); Result audoutGetReleasedAudioOutBuffer(AudioOutBuffer *Buffer, u32 *ReleasedBuffersCount); Result audoutContainsAudioOutBuffer(AudioOutBuffer *Buffer, bool *ContainsBuffer); + +/// These return the state associated with the currently active audio output device. +u32 audoutGetSampleRate(void); +u32 audoutGetChannelCount(void); +PcmFormat audoutGetPcmFormat(void); +AudioOutState audoutGetDeviceState(void);