audout: Added audoutGetServiceSession and audoutGetServiceSession_AudioOut. Improved docs.

This commit is contained in:
yellows8 2019-10-15 18:13:22 -04:00
parent dcafcd0d94
commit 80cc0bb86a
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 17 additions and 0 deletions

View File

@ -27,9 +27,18 @@ struct AudioOutBuffer
u64 data_offset; ///< Offset of data inside the buffer. (Unused?)
};
/// Initialize audout.
Result audoutInitialize(void);
/// Exit audout.
void audoutExit(void);
/// Gets the Service object for the actual audout service session.
Service* audoutGetServiceSession(void);
/// Gets the Service object for IAudioOut.
Service* audoutGetServiceSession_AudioOut(void);
Result audoutListAudioOuts(char *DeviceNames, s32 count, u32 *DeviceNamesCount);
Result audoutOpenAudioOut(const char *DeviceNameIn, char *DeviceNameOut, u32 SampleRateIn, u32 ChannelCountIn, u32 *SampleRateOut, u32 *ChannelCountOut, PcmFormat *Format, AudioOutState *State);
Result audoutGetAudioOutState(AudioOutState *State);

View File

@ -58,6 +58,14 @@ void _audoutCleanup(void) {
serviceClose(&g_audoutSrv);
}
Service* audoutGetServiceSession(void) {
return &g_audoutSrv;
}
Service* audoutGetServiceSession_AudioOut(void) {
return &g_audoutIAudioOut;
}
u32 audoutGetSampleRate(void) {
return g_sampleRate;
}