-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Not 100% sure on all this, but from what i've found:
- channel count is a u16, padded to u32.
- to upper half of the u32 is ignored.
- the channel count is actually set to the lower half, with values 0,2,6 being accepted for default (2), 2, 6 (5.1) respectively.
- the current default channel count in libnx works because the lower half of the u16 is 0, so audout picks 2 channels for us. i can't see the upper half being used anyway so im guessing this was a mistake in the impl where it was assumed that the channel count had to be set in the upper half.
Also, I was wondering if audout api could be changed a little bit in regards to audoutOpenAudioOut. Currently, this will override the g_audoutSrv but not any of the global values such as freq, channel count etc. As it also overrides the g_audoutSrv, it means the previous call to audoutOpenAudioOut which is implicitly done via audoutExit is not closed.
Could we change audoutOpenAudioOut to open the service for a temp value, and if successful and g_audoutSrv is currently active, close g_audoutSrv and replace it with the new service. This will maintain compatibility with all homebrew that use audout whilst now giving the option to change the params.
I can send a pr addressing some / all of the above if you want.