Audio services: Difference between revisions

 
(8 intermediate revisions by the same user not shown)
Line 343: Line 343:
|}
|}


= audren:u =
= (S2) auddev:s =
This is "nn::audio::detail::IAudioRendererManager".
This is "nn::audio::sysdev::ISessionManager".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 350: Line 350:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || OpenAudioRenderer
| 0 ||  
|-
|-
| 1 || GetWorkBufferSize
| 1 ||  
|-
| 2 || [[#GetAudioDeviceService]]
|-
| 3 || [3.0.0+] OpenAudioRendererForManualExecution
|-
| 4 || [4.0.0+] GetAudioDeviceServiceWithRevisionInfo
|}
|}


=== GetAudioDeviceService ===
== Cmd0 ==
Takes an input u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]], returns an output [[#IAudioDevice]].
No input, returns an [[#IAdspShellSession|IAdspShellSession]].
 
== Cmd1 ==
No input, returns an [[#IClientManager|IClientManager]].


== IAudioRenderer ==
== IAdspShellSession ==
This is "nn::audio::detail::IAudioRenderer".
This is "nn::audio::adspshell::IAdspShellSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 371: Line 368:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetSampleRate]]
| 0 || SendKernelDebugCommand
|-
|-
| 1 || [[#GetSampleCount]]
| 1 || SendFatalErrorCommand
|-
|-
| 2 || [[#GetMixBufferCount]]
| 2 || SendReadMemoryCommand
|-
|-
| 3 || [[#GetState]]
| 3 || SendStressTestCommand
|}
 
== IClientManager ==
This is "nn::audio::dpm::IClientManager".
 
{| class="wikitable" border="1"
|-
|-
| 4 || RequestUpdate
! Cmd || Name
|-
|-
| 5 || Start
| 0 ||  
|-
|}
| 6 || Stop
 
=== Cmd0 ===
No input, returns an [[#IClientSession|IClientSession]].
 
=== IClientSession ===
This is "nn::audio::dpm::IClientSession".
 
{| class="wikitable" border="1"
|-
|-
| 7 || QuerySystemEvent
! Cmd || Name
|-
| 0 || CreateProcess
|-
| 1 || WaitProcess
|-
| 2 || TerminateProcess
|}
 
= audren:u =
This is "nn::audio::detail::IAudioRendererManager".
 
{| class="wikitable" border="1"
|-
|-
| 8 || [[#SetRenderingTimeLimit]]
! Cmd || Name
|-
|-
| 9 || [[#GetRenderingTimeLimit]]
| 0 || OpenAudioRenderer
|-
|-
| 10 || [3.0.0+] RequestUpdateAuto
| 1 || GetWorkBufferSize
|-
|-
| 11 || [3.0.0+] ExecuteAudioRendererRendering
| 2 || [[#GetAudioDeviceService]]
|-
|-
| 12 || [15.0.0+] SetVoiceDropParameter
| 3 || [3.0.0+] OpenAudioRendererForManualExecution
|-
|-
| 13 || [15.0.0+] GetVoiceDropParameter
| 4 || [4.0.0+] GetAudioDeviceServiceWithRevisionInfo
|}
|}


=== GetSampleRate ===
=== GetAudioDeviceService ===
No input. Returns an u32 '''SampleRate'''.
Takes an input u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]], returns an output [[#IAudioDevice]].


=== GetSampleCount ===
== IAudioRenderer ==
No input. Returns an u32 '''SampleCount'''.
This is "nn::audio::detail::IAudioRenderer".
 
=== GetMixBufferCount ===
No input. Returns an u32 '''MixBufferCount'''.
 
=== GetState ===
No input. Returns an u32 '''State''' (0=Started, 1=Stopped).
 
=== SetRenderingTimeLimit ===
Takes an u32 '''RenderingTimeLimit'''. No output.
 
=== GetRenderingTimeLimit ===
No input. Returns an u32 '''RenderingTimeLimit'''.
 
== IAudioDevice ==
This is "nn::audio::detail::IAudioDevice".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 425: Line 432:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#ListAudioDeviceName]]
| 0 || [[#GetSampleRate|GetSampleRate]]
|-
|-
| 1 || [[#SetAudioDeviceOutputVolume]]
| 1 || [[#GetSampleCount|GetSampleCount]]
|-
|-
| 2 || [[#GetAudioDeviceOutputVolume]]
| 2 || [[#GetMixBufferCount|GetMixBufferCount]]
|-
|-
| 3 || GetActiveAudioDeviceName
| 3 || [[#GetState|GetState]]
|-
|-
| 4 || QueryAudioDeviceSystemEvent
| 4 || [[#RequestUpdate|RequestUpdate]]
|-
|-
| 5 || GetActiveChannelCount
| 5 || [[#Start|Start]]
|-
|-
| 6 || [3.0.0+] [[#ListAudioDeviceNameAuto]]
| 6 || [[#Stop|Stop]]
|-
|-
| 7 || [3.0.0+] [[#SetAudioDeviceOutputVolumeAuto]]
| 7 || [[#QuerySystemEvent|QuerySystemEvent]]
|-
|-
| 8 || [3.0.0+] [[#GetAudioDeviceOutputVolumeAuto]]
| 8 || [[#SetRenderingTimeLimit|SetRenderingTimeLimit]]
|-
|-
| 10 || [3.0.0+] GetActiveAudioDeviceNameAuto
| 9 || [[#GetRenderingTimeLimit|GetRenderingTimeLimit]]
|-
|-
| 11 || [3.0.0+] QueryAudioDeviceInputEvent
| 10 || [3.0.0+] [[#RequestUpdateAuto|RequestUpdateAuto]]
|-
|-
| 12 || [3.0.0+] QueryAudioDeviceOutputEvent
| 11 || [3.0.0+] ExecuteAudioRendererRendering
|-
|-
| 13 || [13.0.0+] [[#GetActiveAudioOutputDeviceName]] ([5.0.0-12.1.0] [[#GetAudioSystemMasterVolumeSetting]])
| 12 || [15.0.0+] SetVoiceDropParameter
|-
|-
| 14 || [13.0.0+] ListAudioOutputDeviceName
| 13 || [15.0.0+] GetVoiceDropParameter
|-
| 15 || [17.0.0+] AcquireAudioInputDeviceNotification
|-
| 16 || [17.0.0+] ReleaseAudioInputDeviceNotification
|-
| 17 || [17.0.0+] AcquireAudioOutputDeviceNotification
|-
| 18 || [17.0.0+] ReleaseAudioOutputDeviceNotification
|-
| 19 || [18.0.0+] SetAudioDeviceOutputVolumeAutoTuneEnabled
|-
| 20 || [18.0.0+] IsAudioDeviceOutputVolumeAutoTuneEnabled
|-
| 21 || [21.0.0+] IsActiveOutputDeviceEstimatedLowLatency
|}
|}


=== ListAudioDeviceName ===
=== GetSampleRate ===
Takes a type-0x6 output buffer containing an array of '''DeviceName'''. Returns an output s32 for total number of output entries.
No input. Returns an u32 '''SampleRate'''.


=== SetAudioDeviceOutputVolume ===
=== GetSampleCount ===
Takes a type-0x5 input buffer containing the '''DeviceName''' and a float. No output.
No input. Returns an u32 '''SampleCount'''.
 
=== GetMixBufferCount ===
No input. Returns an u32 '''MixBufferCount'''.


=== GetAudioDeviceOutputVolume ===
=== GetState ===
Takes a type-0x5 input buffer containing the '''DeviceName'''. Returns an output float.
No input. Returns an u32 '''State''' (0=Started, 1=Stopped).


=== ListAudioDeviceNameAuto ===
The output is determined using the flag updated by [[#Start|Start]]/[[#Stop|Stop]].
Takes a type-0x22 output buffer containing an array of '''DeviceName'''. Returns an output s32 for total number of output entries.


=== SetAudioDeviceOutputVolumeAuto ===
=== RequestUpdate ===
Takes a type-0x21 input buffer containing the '''DeviceName''' and a float. No output.
Takes two type-0x6 output buffers and a type-0x5 input buffer.


=== GetAudioDeviceOutputVolumeAuto ===
=== Start ===
Takes a type-0x21 input buffer containing the '''DeviceName'''. Returns an output float.
No input/output.


=== GetAudioSystemMasterVolumeSetting ===
Besides logging, this calls a func which essentially clears a state field and sets a flag, and also calls a func.
Takes a type-0x5 input buffer, returns 4-bytes of output.


=== GetActiveAudioOutputDeviceName ===
The thread which handles generating/sending ADSP commands will only do so when the above flag indicates the state is Started.
Takes a type-0x6 output buffer, returns no output.


= audout:a =
=== Stop ===
This is "nn::audio::detail::IAudioOutManagerForApplet".
No input/output.


This was removed with [11.0.0+].
After logging, this calls a func which essentially returns when the flag from [[#Start|Start]] is not set. Various funcs are called, then the flag is cleared. If needed, this waits on an event, then this returns.


{| class="wikitable" border="1"
=== QuerySystemEvent ===
No input, returns an output Event handle.
 
=== SetRenderingTimeLimit ===
Takes an u32 '''RenderingTimeLimit'''. No output.
 
=== GetRenderingTimeLimit ===
No input. Returns an u32 '''RenderingTimeLimit'''.
 
=== RequestUpdateAuto ===
Takes two type-0x22 output buffers and a type-0x21 input buffer.
 
This is identical to [[#RequestUpdate|RequestUpdate]] besides the buffer-types.
 
== IAudioDevice ==
This is "nn::audio::detail::IAudioDevice".
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || RequestSuspend
| 0 || [[#ListAudioDeviceName]]
|-
| 1 || [[#SetAudioDeviceOutputVolume]]
|-
|-
| 1 || RequestResume
| 2 || [[#GetAudioDeviceOutputVolume]]
|-
|-
| 2 || GetProcessMasterVolume
| 3 || GetActiveAudioDeviceName
|-
|-
| 3 || SetProcessMasterVolume
| 4 || QueryAudioDeviceSystemEvent
|-
|-
| 4 || [4.0.0+] GetProcessRecordVolume
| 5 || GetActiveChannelCount
|-
|-
| 5 || [4.0.0+] SetProcessRecordVolume
| 6 || [3.0.0+] [[#ListAudioDeviceNameAuto]]
|}
|-
 
| 7 || [3.0.0+] [[#SetAudioDeviceOutputVolumeAuto]]
[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
|-
 
| 8 || [3.0.0+] [[#GetAudioDeviceOutputVolumeAuto]]
= audin:a =
This is "nn::audio::detail::IAudioInManagerForApplet".
 
This was removed with [11.0.0+].
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
| 10 || [3.0.0+] GetActiveAudioDeviceNameAuto
|-
|-
| 0 || RequestSuspend
| 11 || [3.0.0+] QueryAudioDeviceInputEvent
|-
|-
| 1 || RequestResume
| 12 || [3.0.0+] QueryAudioDeviceOutputEvent
|-
|-
| 2 || GetProcessMasterVolume
| 13 || [13.0.0+] [[#GetActiveAudioOutputDeviceName]] ([5.0.0-12.1.0] [[#GetAudioSystemMasterVolumeSetting]])
|-
|-
| 3 || SetProcessMasterVolume
| 14 || [13.0.0+] ListAudioOutputDeviceName
|}
|-
 
| 15 || [17.0.0+] [[#AcquireAudioInputDeviceNotification|AcquireAudioInputDeviceNotification]]
[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
|-
 
| 16 || [17.0.0+] [[#ReleaseAudioInputDeviceNotification|ReleaseAudioInputDeviceNotification]]
= audrec:a =
|-
This is "nn::audio::detail::IFinalOutputRecorderManagerForApplet".
| 17 || [17.0.0+] [[#AcquireAudioOutputDeviceNotification|AcquireAudioOutputDeviceNotification]]
 
|-
{| class="wikitable" border="1"
| 18 || [17.0.0+] [[#ReleaseAudioOutputDeviceNotification|ReleaseAudioOutputDeviceNotification]]
|-
|-
! Cmd || Name
| 19 || [18.0.0+] SetAudioDeviceOutputVolumeAutoTuneEnabled
|-
|-
| 0 || RequestSuspend
| 20 || [18.0.0+] IsAudioDeviceOutputVolumeAutoTuneEnabled
|-
|-
| 1 || RequestResume
| 21 || [21.0.0+] [[#IsActiveOutputDeviceEstimatedLowLatency|IsActiveOutputDeviceEstimatedLowLatency]]
|}
|}


[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
=== ListAudioDeviceName ===
Takes a type-0x6 output buffer containing an array of '''DeviceName'''. Returns an output s32 for total number of output entries.


= audren:a =
=== SetAudioDeviceOutputVolume ===
This is "nn::audio::detail::IAudioRendererManagerForApplet".
Takes a type-0x5 input buffer containing the '''DeviceName''' and a float. No output.


This was removed with [11.0.0+].
=== GetAudioDeviceOutputVolume ===
Takes a type-0x5 input buffer containing the '''DeviceName'''. Returns an output float.


{| class="wikitable" border="1"
=== ListAudioDeviceNameAuto ===
|-
Takes a type-0x22 output buffer containing an array of '''DeviceName'''. Returns an output s32 for total number of output entries.
! Cmd || Name
|-
| 0 || RequestSuspend
|-
| 1 || RequestResume
|-
| 2 || GetProcessMasterVolume
|-
| 3 || SetProcessMasterVolume
|-
| 4 || RegisterAppletResourceUserId
|-
| 5 || UnregisterAppletResourceUserId
|-
| 6 || [4.0.0+] GetProcessRecordVolume
|-
| 7 || [4.0.0+] SetProcessRecordVolume
|}


[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
=== SetAudioDeviceOutputVolumeAuto ===
Takes a type-0x21 input buffer containing the '''DeviceName''' and a float. No output.


= audout:d, audin:d, audrec:d, audren:d =
=== GetAudioDeviceOutputVolumeAuto ===
This is "nn::audio::detail::IAudioOutManagerForDebugger", "nn::audio::detail::IAudioInManagerForDebugger", "nn::audio::detail::IFinalOutputRecorderManagerForDebugger", "nn::audio::detail::IAudioRendererManagerForDebugger".
Takes a type-0x21 input buffer containing the '''DeviceName'''. Returns an output float.
 
=== GetAudioSystemMasterVolumeSetting ===
Takes a type-0x5 input buffer, returns 4-bytes of output.
 
=== GetActiveAudioOutputDeviceName ===
Takes a type-0x6 output buffer, returns no output.
 
=== AcquireAudioInputDeviceNotification ===
Takes an input u64, returns an output handle.
 
On NX this just returns an error.
 
=== ReleaseAudioInputDeviceNotification ===
Takes an input u64, no output.
 
On NX this just returns an error.
 
=== AcquireAudioOutputDeviceNotification ===
Takes an input u64, returns an output handle.
 
On NX this just returns an error.
 
=== ReleaseAudioOutputDeviceNotification ===
Takes an input u64, no output.
 
On NX this just returns an error.
 
=== IsActiveOutputDeviceEstimatedLowLatency ===
No input, returns an output bool.
 
The output bool is set to global_state_field == 0x4.
 
= audout:a =
This is "nn::audio::detail::IAudioOutManagerForApplet".


These were removed with [11.0.0+].
This was removed with [11.0.0+].


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 587: Line 612:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#RequestSuspend]]
| 0 || RequestSuspend
|-
|-
| 1 || [[#RequestResume]]
| 1 || RequestResume
|-
| 2 || GetProcessMasterVolume
|-
| 3 || SetProcessMasterVolume
|-
| 4 || [4.0.0+] GetProcessRecordVolume
|-
| 5 || [4.0.0+] SetProcessRecordVolume
|}
|}


== RequestSuspend ==
[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]].


== RequestResume ==
= audin:a =
Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]].
This is "nn::audio::detail::IAudioInManagerForApplet".


= audctl =
This was removed with [11.0.0+].
This is "nn::audioctrl::detail::IAudioController".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 605: Line 636:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || GetTargetVolume
| 0 || RequestSuspend
|-
|-
| 1 || SetTargetVolume
| 1 || RequestResume
|-
|-
| 2 || GetTargetVolumeMin
| 2 || GetProcessMasterVolume
|-
|-
| 3 || GetTargetVolumeMax
| 3 || SetProcessMasterVolume
|}
 
[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
 
= audrec:a =
This is "nn::audio::detail::IFinalOutputRecorderManagerForApplet".
 
{| class="wikitable" border="1"
|-
|-
| 4 || IsTargetMute
! Cmd || Name
|-
|-
| 5 || SetTargetMute
| 0 || RequestSuspend
|-
|-
| 6 || [20.0.0+] ([1.0.0-17.0.1] IsTargetConnected)
| 1 || RequestResume
|}
 
[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
 
= audren:a =
This is "nn::audio::detail::IAudioRendererManagerForApplet".
 
This was removed with [11.0.0+].
 
{| class="wikitable" border="1"
|-
|-
| 7 || SetDefaultTarget
! Cmd || Name
|-
|-
| 8 || GetDefaultTarget
| 0 || RequestSuspend
|-
|-
| 9 || GetAudioOutputMode
| 1 || RequestResume
|-
|-
| 10 || SetAudioOutputMode
| 2 || GetProcessMasterVolume
|-
|-
| 11 || [1.0.0-13.2.1] SetForceMutePolicy
| 3 || SetProcessMasterVolume
|-
|-
| 12 || [1.0.0-13.2.1] GetForceMutePolicy
| 4 || RegisterAppletResourceUserId
|-
|-
| 13 || GetOutputModeSetting
| 5 || UnregisterAppletResourceUserId
|-
|-
| 14 || SetOutputModeSetting
| 6 || [4.0.0+] GetProcessRecordVolume
|-
|-
| 15 || SetOutputTarget
| 7 || [4.0.0+] SetProcessRecordVolume
|-
|}
| 16 || SetInputTargetForceEnabled
 
|-
[4.0.0+] RequestSuspend/RequestResume no longer returns an output handle.
| 17 || [3.0.0+] SetHeadphoneOutputLevelMode
 
= audout:d, audin:d, audrec:d, audren:d =
This is "nn::audio::detail::IAudioOutManagerForDebugger", "nn::audio::detail::IAudioInManagerForDebugger", "nn::audio::detail::IFinalOutputRecorderManagerForDebugger", "nn::audio::detail::IAudioRendererManagerForDebugger".
 
These were removed with [11.0.0+].
 
{| class="wikitable" border="1"
|-
|-
| 18 || [3.0.0+] GetHeadphoneOutputLevelMode
! Cmd || Name
|-
|-
| 19 || [17.0.0+] SetForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioVolumeUpdateEventForPlayReport)
| 0 || [[#RequestSuspend]]
|-
|-
| 20 || [17.0.0+] IsForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioOutputDeviceUpdateEventForPlayReport)
| 1 || [[#RequestResume]]
|}
 
== RequestSuspend ==
Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]].
 
== RequestResume ==
Takes an u64 [[AM_services#AppletResourceUserId|AppletResourceUserId]].
 
= audctl =
This is "nn::audioctrl::detail::IAudioController".
 
{| class="wikitable" border="1"
|-
|-
| 21 || [3.0.0-13.2.1] GetAudioOutputTargetForPlayReport
! Cmd || Name
|-
|-
| 22 || [3.0.0+] NotifyHeadphoneVolumeWarningDisplayedEvent
| 0 || GetTargetVolume
|-
|-
| 23 || [4.0.0+] [[#SetSystemOutputMasterVolume]]
| 1 || SetTargetVolume
|-
|-
| 24 || [4.0.0+] [[#GetSystemOutputMasterVolume]]
| 2 || GetTargetVolumeMin
|-
|-
| 25 || [20.0.0+] ([4.0.0-13.2.1] [[#GetAudioVolumeDataForPlayReport]])
| 3 || GetTargetVolumeMax
|-
|-
| 26 || [4.0.0-14.1.2] [[#UpdateHeadphoneSettings]]
| 4 || IsTargetMute
|-
|-
| 27 || [7.0.0-16.1.0] SetVolumeMappingTableForDev
| 5 || SetTargetMute
|-
|-
| 28 || [10.0.0-13.2.1] GetAudioOutputChannelCountForPlayReport
| 6 || [20.0.0+] ([1.0.0-17.0.1] IsTargetConnected)
|-
|-
| 29 || [10.0.0-13.2.1] BindAudioOutputChannelCountUpdateEventForPlayReport
| 7 || SetDefaultTarget
|-
|-
| 30 || [13.0.0+] SetSpeakerAutoMuteEnabled
| 8 || GetDefaultTarget
|-
|-
| 31 || [13.0.0+] IsSpeakerAutoMuteEnabled
| 9 || GetAudioOutputMode
|-
|-
| 32 || [13.0.0+] GetActiveOutputTarget
| 10 || SetAudioOutputMode
|-
|-
| 33 || [13.0.0+] GetTargetDeviceInfo
| 11 || [1.0.0-13.2.1] SetForceMutePolicy
|-
|-
| 34 || [13.0.0+] AcquireTargetNotification
| 12 || [1.0.0-13.2.1] GetForceMutePolicy
|-
|-
| 35 || [14.0.0-14.1.2] SetHearingProtectionSafeguardTimerRemainingTimeForDebug
| 13 || GetOutputModeSetting
|-
|-
| 36 || [14.0.0-14.1.2] GetHearingProtectionSafeguardTimerRemainingTimeForDebug
| 14 || SetOutputModeSetting
|-
|-
| 37 || [14.0.0-14.1.2] SetHearingProtectionSafeguardEnabled
| 15 || SetOutputTarget
|-
|-
| 38 || [14.0.0-14.1.2] IsHearingProtectionSafeguardEnabled
| 16 || SetInputTargetForceEnabled
|-
|-
| 39 || [14.0.0-14.1.2] IsHearingProtectionSafeguardMonitoringOutputForDebug
| 17 || [3.0.0+] SetHeadphoneOutputLevelMode
|-
|-
| 40 || [14.0.0+] [[#GetSystemInformationForDebug]]
| 18 || [3.0.0+] GetHeadphoneOutputLevelMode
|-
|-
| 41 || [15.0.0-19.0.1] SetVolumeButtonLongPressTime
| 19 || [17.0.0+] SetForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioVolumeUpdateEventForPlayReport)
|-
|-
| 42 || [15.0.0+] SetNativeVolumeForDebug
| 20 || [17.0.0+] IsForceMonauralOutputModeEnabled ([3.0.0-13.2.1] AcquireAudioOutputDeviceUpdateEventForPlayReport)
|-
|-
| 43 || [21.0.0+]  
| 21 || [3.0.0-13.2.1] GetAudioOutputTargetForPlayReport
|-
|-
| 5000 || [19.0.0+]  
| 22 || [3.0.0+] NotifyHeadphoneVolumeWarningDisplayedEvent
|-
|-
| 10000 || [13.0.0-19.0.1] NotifyAudioOutputTargetForPlayReport
| 23 || [4.0.0+] [[#SetSystemOutputMasterVolume]]
|-
|-
| 10001 || [13.0.0-19.0.1] NotifyAudioOutputChannelCountForPlayReport
| 24 || [4.0.0+] [[#GetSystemOutputMasterVolume]]
|-
|-
| 10002 || [13.0.0-19.0.1] NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport
| 25 || [20.0.0+] ([4.0.0-13.2.1] [[#GetAudioVolumeDataForPlayReport]])
|-
|-
| 10100 || [14.0.0+] [[#GetAudioVolumeDataForPlayReport]]
| 26 || [4.0.0-14.1.2] [[#UpdateHeadphoneSettings]]
|-
| 27 || [7.0.0-16.1.0] SetVolumeMappingTableForDev
|-
|-
| 10101 || [14.0.0+] BindAudioVolumeUpdateEventForPlayReport
| 28 || [10.0.0-13.2.1] GetAudioOutputChannelCountForPlayReport
|-
|-
| 10102 || [14.0.0-19.0.1] BindAudioOutputTargetUpdateEventForPlayReport
| 29 || [10.0.0-13.2.1] BindAudioOutputChannelCountUpdateEventForPlayReport
|-
|-
| 10103 || [14.0.0-19.0.1] GetAudioOutputTargetForPlayReport
| 30 || [13.0.0+] SetSpeakerAutoMuteEnabled
|-
|-
| 10104 || [14.0.0-19.0.1] GetAudioOutputChannelCountForPlayReport
| 31 || [13.0.0+] IsSpeakerAutoMuteEnabled
|-
|-
| 10105 || [14.0.0-19.0.1] BindAudioOutputChannelCountUpdateEventForPlayReport
| 32 || [13.0.0+] GetActiveOutputTarget
|-
|-
| 10106 || [14.0.0-19.0.1] GetDefaultAudioOutputTargetForPlayReport
| 33 || [13.0.0+] GetTargetDeviceInfo
|-
|-
| 10200 || [20.0.0+]
| 34 || [13.0.0+] AcquireTargetNotification
|-
|-
| 50000 || [15.0.0-18.1.0] SetAnalogInputBoostGainForPrototyping
| 35 || [14.0.0-14.1.2] SetHearingProtectionSafeguardTimerRemainingTimeForDebug
|-
|-
| 50001 || [19.0.0-19.0.1] OverrideDefaultTargetForDebug
| 36 || [14.0.0-14.1.2] GetHearingProtectionSafeguardTimerRemainingTimeForDebug
|-
|-
| 50003 || [19.0.0+] SetForceOverrideExternalDeviceNameForDebug
| 37 || [14.0.0-14.1.2] SetHearingProtectionSafeguardEnabled
|-
|-
| 50004 || [19.0.0+] ClearForceOverrideExternalDeviceNameForDebug
| 38 || [14.0.0-14.1.2] IsHearingProtectionSafeguardEnabled
|}
|-
 
| 39 || [14.0.0-14.1.2] IsHearingProtectionSafeguardMonitoringOutputForDebug
== SetSystemOutputMasterVolume ==
|-
Takes an input float '''SystemOutputMasterVolume'''. No output.
| 40 || [14.0.0+] [[#GetSystemInformationForDebug]]
 
|-
[20.0.0+] Originally any input was accepted, now input must be in range 0.0-1.0 otherwise it's replaced by nearest accepted value.
| 41 || [15.0.0-19.0.1] SetVolumeButtonLongPressTime
 
|-
== GetSystemOutputMasterVolume ==
| 42 || [15.0.0+] SetNativeVolumeForDebug
No input. Returns an output float '''SystemOutputMasterVolume'''.
|-
 
| 43 || [21.0.0+]  
== GetAudioVolumeDataForPlayReport ==
|-
No input, returns a total of 7-bytes of output.
| 5000 || [19.0.0+]  
 
[13.0.0+] No input, returns a total of 9-bytes of output.
 
[20.0.0+] Now takes a 0x400-bytes type-0x16 output buffer and no longer returns any output.
 
== UpdateHeadphoneSettings ==
Takes one input bool. No output.
 
NS calls this with the result of [[Parental_Control_services#IParentalControlService|IParentalControlService::IsRestrictionEnabled]].
 
== GetSystemInformationForDebug ==
Takes a type-0x1A output buffer. No output.
 
[15.0.0+] Now takes a type-0x16 output buffer.
 
[18.0.0+] Originally the output buffer was a binary structure, now it's just a string.
 
[20.0.0+] Now takes a total of 0x40-bytes of input and the type-0x16 output buffer is now 0x2000-bytes instead of 0x1000-bytes.
 
= codecctl =
This is "nn::audio::detail::ICodecController".
 
This service no longer exists in [3.0.0+].
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
| 10000 || [13.0.0-19.0.1] NotifyAudioOutputTargetForPlayReport
|-
|-
| 0 || [[#Initialize]]
| 10001 || [13.0.0-19.0.1] NotifyAudioOutputChannelCountForPlayReport
|-
| 10002 || [13.0.0-19.0.1] NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport
|-
|-
| 1 || [[#Finalize]]
| 10100 || [14.0.0+] [[#GetAudioVolumeDataForPlayReport]]
|-
|-
| 2 || [[#Sleep]]
| 10101 || [14.0.0+] BindAudioVolumeUpdateEventForPlayReport
|-
|-
| 3 || [[#Wake]]
| 10102 || [14.0.0-19.0.1] BindAudioOutputTargetUpdateEventForPlayReport
|-
|-
| 4 || [[#SetVolume]]
| 10103 || [14.0.0-19.0.1] GetAudioOutputTargetForPlayReport
|-
|-
| 5 || [[#GetVolumeMax]]
| 10104 || [14.0.0-19.0.1] GetAudioOutputChannelCountForPlayReport
|-
|-
| 6 || [[#GetVolumeMin]]
| 10105 || [14.0.0-19.0.1] BindAudioOutputChannelCountUpdateEventForPlayReport
|-
|-
| 7 || [[#SetActiveTarget]]
| 10106 || [14.0.0-19.0.1] GetDefaultAudioOutputTargetForPlayReport
|-
|-
| 8 || [[#GetActiveTarget]]
| 10200 || [20.0.0+]
|-
|-
| 9 || [[#BindHeadphoneMicJackInterrupt]]
| 50000 || [15.0.0-18.1.0] SetAnalogInputBoostGainForPrototyping
|-
|-
| 10 || [[#IsHeadphoneMicJackInserted]]
| 50001 || [19.0.0-19.0.1] OverrideDefaultTargetForDebug
|-
|-
| 11 || [[#ClearHeadphoneMicJackInterrupt]]
| 50003 || [19.0.0+] SetForceOverrideExternalDeviceNameForDebug
|-
|-
| 12 || [[#IsRequested]]
| 50004 || [19.0.0+] ClearForceOverrideExternalDeviceNameForDebug
|}
|}


== Initialize ==
== SetSystemOutputMasterVolume ==
No input/output.
Takes an input float '''SystemOutputMasterVolume'''. No output.


== Finalize ==
[20.0.0+] Originally any input was accepted, now input must be in range 0.0-1.0 otherwise it's replaced by nearest accepted value.
No input/output.


== Sleep ==
== GetSystemOutputMasterVolume ==
No input/output.
No input. Returns an output float '''SystemOutputMasterVolume'''.


== Wake ==
== GetAudioVolumeDataForPlayReport ==
No input/output.
No input, returns a total of 7-bytes of output.


== SetVolume ==
[13.0.0+] No input, returns a total of 9-bytes of output.
Takes an u32 '''Volume'''. No output.


== GetVolumeMax ==
[20.0.0+] Now takes a 0x400-bytes type-0x16 output buffer and no longer returns any output.
No input. Returns an u32 '''VolumeMax'''.


== GetVolumeMin ==
== UpdateHeadphoneSettings ==
No input. Returns an u32 '''VolumeMin'''.
Takes one input bool. No output.


== SetActiveTarget ==
NS calls this with the result of [[Parental_Control_services#IParentalControlService|IParentalControlService::IsRestrictionEnabled]].
Takes an u32 '''Target'''. No output.


== GetActiveTarget ==
== GetSystemInformationForDebug ==
No input. Returns an u32 '''Target'''.
Takes a type-0x1A output buffer. No output.


== BindHeadphoneMicJackInterrupt ==
[15.0.0+] Now takes a type-0x16 output buffer.
No input. Returns an event handle.


== IsHeadphoneMicJackInserted ==
[18.0.0+] Originally the output buffer was a binary structure, now it's just a string.
No input. Returns a bool.


== ClearHeadphoneMicJackInterrupt ==
[20.0.0+] Now takes a total of 0x40-bytes of input and the type-0x16 output buffer is now 0x2000-bytes instead of 0x1000-bytes.
No input/output.


== IsRequested ==
= codecctl =
No input. Returns a bool.
This is "nn::audio::detail::ICodecController".


= hwopus =
This service no longer exists in [3.0.0+].
This is "nn::codec::detail::IHardwareOpusDecoderManager".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 837: Line 875:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#OpenHardwareOpusDecoder]]
| 0 || [[#Initialize]]
|-
|-
| 1 || [[#GetWorkBufferSize]]
| 1 || [[#Finalize]]
|-
| 2 || [[#Sleep]]
|-
| 3 || [[#Wake]]
|-
| 4 || [[#SetVolume]]
|-
|-
| 2 || [3.0.0+] [[#OpenHardwareOpusDecoderForMultiStream]]
| 5 || [[#GetVolumeMax]]
|-
|-
| 3 || [3.0.0+] [[#GetWorkBufferSizeForMultiStream]]
| 6 || [[#GetVolumeMin]]
|-
|-
| 4 || [12.0.0+] OpenHardwareOpusDecoderEx
| 7 || [[#SetActiveTarget]]
|-
|-
| 5 || [12.0.0+] GetWorkBufferSizeEx
| 8 || [[#GetActiveTarget]]
|-
|-
| 6 || [12.0.0+] OpenHardwareOpusDecoderForMultiStreamEx
| 9 || [[#BindHeadphoneMicJackInterrupt]]
|-
|-
| 7 || [12.0.0+] GetWorkBufferSizeForMultiStreamEx
| 10 || [[#IsHeadphoneMicJackInserted]]
|-
|-
| 8 || [16.0.0+] GetWorkBufferSizeExEx
| 11 || [[#ClearHeadphoneMicJackInterrupt]]
|-
|-
| 9 || [16.0.0+] GetWorkBufferSizeForMultiStreamExEx
| 12 || [[#IsRequested]]
|}
|}


Official sw can use either software libopus, or hwopus (libopus running on the ADSP) via "nn::codec::HardwareOpus*" (separate from the former).
== Initialize ==
No input/output.


== OpenHardwareOpusDecoder ==
== Finalize ==
Takes two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
No input/output.


== GetWorkBufferSize ==
== Sleep ==
Takes two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
No input/output.


== OpenHardwareOpusDecoderForMultiStream ==
== Wake ==
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
No input/output.


The input buffer is a [[#OpusMultiStreamParameters]] struct. The user-process initializes this struct the same way as [[#GetWorkBufferSizeForMultiStream]], except that an u8-array specified by the user is copied to +0x10 with size '''ChannelCount''', when '''ChannelCount''' above 0.
== SetVolume ==
Takes an u32 '''Volume'''. No output.


== GetWorkBufferSizeForMultiStream ==
== GetVolumeMax ==
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
No input. Returns an u32 '''VolumeMax'''.


The input buffer is a [[#OpusMultiStreamParameters]] struct.
== GetVolumeMin ==
No input. Returns an u32 '''VolumeMin'''.


== OpenHardwareOpusDecoderEx ==
== SetActiveTarget ==
Takes a struct [[#OpusParametersEx]] and a u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
Takes an u32 '''Target'''. No output.


When ''UseLargeFrameSize'' in the parameter struct is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms.
== GetActiveTarget ==
No input. Returns an u32 '''Target'''.


== GetWorkBufferSizeEx ==
== BindHeadphoneMicJackInterrupt ==
Takes a struct [[#OpusParametersEx]]. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
No input. Returns an event handle.


== OpenHardwareOpusDecoderForMultiStreamEx ==
== IsHeadphoneMicJackInserted ==
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
No input. Returns a bool.


The input buffer is a [[#OpusMultiStreamParametersEx]] struct. When ''UseLargeFrameSize'' is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms.
== ClearHeadphoneMicJackInterrupt ==
No input/output.


== GetWorkBufferSizeForMultiStreamEx ==
== IsRequested ==
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
No input. Returns a bool.


The input buffer is a [[#OpusMultiStreamParametersEx]] struct.
= hwopus =
 
This is "nn::codec::detail::IHardwareOpusDecoderManager".
== IHardwareOpusDecoder ==
This is "nn::codec::detail::IHardwareOpusDecoder".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 901: Line 948:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [4.0.0+] [[#DecodeInterleavedOld]] ([1.0.0-3.0.2] DecodeInterleaved)
| 0 || [[#OpenHardwareOpusDecoder]]
|-
|-
| 1 || [[#SetContext]]
| 1 || [[#GetWorkBufferSize]]
|-
| 2 || [3.0.0+] [[#OpenHardwareOpusDecoderForMultiStream]]
|-
|-
| 2 || [4.0.0+] [[#DecodeInterleavedForMultiStreamOld]] ([3.0.0-3.0.2] DecodeInterleavedForMultiStream)
| 3 || [3.0.0+] [[#GetWorkBufferSizeForMultiStream]]
|-
|-
| 3 || [3.0.0+] [[#SetContextForMultiStream]]
| 4 || [12.0.0+] OpenHardwareOpusDecoderEx
|-
|-
| 4 || [6.0.0+] [[#DecodeInterleavedWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedWithPerf)
| 5 || [12.0.0+] GetWorkBufferSizeEx
|-
|-
| 5 || [6.0.0+] [[#DecodeInterleavedForMultiStreamWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedForMultiStreamWithPerf)
| 6 || [12.0.0+] OpenHardwareOpusDecoderForMultiStreamEx
|-
|-
| 6 || [6.0.0+] DecodeInterleavedWithPerfAndResetOld ([6.0.0-6.2.0] DecodeInterleaved)
| 7 || [12.0.0+] GetWorkBufferSizeForMultiStreamEx
|-
|-
| 7 || [6.0.0+] DecodeInterleavedForMultiStreamWithPerfAndResetOld ([6.0.0-6.2.0] DecodeInterleavedForMultiStream)
| 8 || [16.0.0+] GetWorkBufferSizeExEx
|-
|-
| 8 || [7.0.0+] [[#DecodeInterleaved]]
| 9 || [16.0.0+] GetWorkBufferSizeForMultiStreamExEx
|-
|-
| 9 || [7.0.0+] [[#DecodeInterleavedForMultiStream]]
| 100 || [S2]
|}
|}


=== DecodeInterleavedOld ===
Official sw can use either software libopus, or hwopus (libopus running on the ADSP) via "nn::codec::HardwareOpus*" (separate from the former).
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''.


Calls the same func as [[#DecodeInterleaved]] internally with flag=0 and out_u64_ptr=NULL.
== OpenHardwareOpusDecoder ==
Takes two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.


=== SetContext ===
== GetWorkBufferSize ==
Takes a type-0x5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. The input buffer is unused.
Takes two s32s '''SampleRate''' and '''ChannelCount''' packed as an u64. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.


=== DecodeInterleavedForMultiStreamOld ===
== OpenHardwareOpusDecoderForMultiStream ==
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''.
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.


Calls the same func as [[#DecodeInterleavedForMultiStream]] internally with flag=0 and out_u64_ptr=NULL.
The input buffer is a [[#OpusMultiStreamParameters]] struct. The user-process initializes this struct the same way as [[#GetWorkBufferSizeForMultiStream]], except that an u8-array specified by the user is copied to +0x10 with size '''ChannelCount''', when '''ChannelCount''' above 0.


=== SetContextForMultiStream ===
== GetWorkBufferSizeForMultiStream ==
Takes a type-0x5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder.
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.


=== DecodeInterleavedWithPerfOld ===
The input buffer is a [[#OpusMultiStreamParameters]] struct.
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.


The output u64 is ignored by official user-processes.
== OpenHardwareOpusDecoderEx ==
Takes a struct [[#OpusParametersEx]] and a u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.


Calls the same func as [[#DecodeInterleaved]] internally with flag=0.
When ''UseLargeFrameSize'' in the parameter struct is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms.


=== DecodeInterleavedForMultiStreamWithPerfOld ===
== GetWorkBufferSizeEx ==
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.
Takes a struct [[#OpusParametersEx]]. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.


The output u64 is ignored by official user-processes.
== OpenHardwareOpusDecoderForMultiStreamEx ==
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.


Calls the same func as [[#DecodeInterleavedForMultiStream]] internally with flag=0.
The input buffer is a [[#OpusMultiStreamParametersEx]] struct. When ''UseLargeFrameSize'' is 1 a larger output buffer that can store 120ms opus frames is used vs the default of 40ms.


=== DecodeInterleaved ===
== GetWorkBufferSizeForMultiStreamEx ==
Takes an input u8 bool flag, a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.


The bool flag indicates whether or not a reset of the decoder context is being requested.
The input buffer is a [[#OpusMultiStreamParametersEx]] struct.


=== DecodeInterleavedForMultiStream ===
== Cmd100 ==
Takes an input u8 bool flag, a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.
No input, returns an [[#IClientSession_2|IClientSession]].


The bool flag indicates whether or not a reset of the decoder context is being requested.
== IHardwareOpusDecoder ==
 
This is "nn::codec::detail::IHardwareOpusDecoder".
= auddebug =
This is "nn::audio::detail::IAudioDebugManager".
 
This service doesn't exist in retail units.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 971: Line 1,017:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || ProfilerStart
| 0 || [4.0.0+] [[#DecodeInterleavedOld]] ([1.0.0-3.0.2] DecodeInterleaved)
|-
|-
| 1 || ProfilerStop
| 1 || [[#SetContext]]
|-
|-
| 2 || CpuProfilerStart
| 2 || [4.0.0+] [[#DecodeInterleavedForMultiStreamOld]] ([3.0.0-3.0.2] DecodeInterleavedForMultiStream)
|-
|-
| 3 || CpuProfilerStop
| 3 || [3.0.0+] [[#SetContextForMultiStream]]
|}
 
= aud:a =
This is "nn::audio::detail::IAudioSystemManagerForApplet".
 
This was added with [11.0.0+].
 
{| class="wikitable" border="1"
|-
|-
! Cmd || Name
| 4 || [6.0.0+] [[#DecodeInterleavedWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedWithPerf)
|-
|-
| 0 || RegisterAppletResourceUserId
| 5 || [6.0.0+] [[#DecodeInterleavedForMultiStreamWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedForMultiStreamWithPerf)
|-
|-
| 1 || UnregisterAppletResourceUserId
| 6 || [6.0.0+] DecodeInterleavedWithPerfAndResetOld ([6.0.0-6.2.0] DecodeInterleaved)
|-
|-
| 2 || RequestSuspendAudio
| 7 || [6.0.0+] DecodeInterleavedForMultiStreamWithPerfAndResetOld ([6.0.0-6.2.0] DecodeInterleavedForMultiStream)
|-
|-
| 3 || RequestResumeAudio
| 8 || [7.0.0+] [[#DecodeInterleaved]]
|-
|-
| 4 || GetAudioOutputProcessMasterVolume
| 9 || [7.0.0+] [[#DecodeInterleavedForMultiStream]]
|-
|}
| 5 || SetAudioOutputProcessMasterVolume
 
|-
=== DecodeInterleavedOld ===
| 6 || GetAudioInputProcessMasterVolume
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''.
|-
 
| 7 || SetAudioInputProcessMasterVolume
Calls the same func as [[#DecodeInterleaved]] internally with flag=0 and out_u64_ptr=NULL.
|-
| 8 || GetAudioOutputProcessRecordVolume
|-
| 9 || SetAudioOutputProcessRecordVolume
|-
| 10 || [18.0.0-19.0.1] GetAppletStateSummaries
|}


= aud:d =
=== SetContext ===
This is "nn::audio::detail::IAudioSystemManagerForDebugger".
Takes a type-0x5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. The input buffer is unused.


This was added with [11.0.0+].  
=== DecodeInterleavedForMultiStreamOld ===
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''.


{| class="wikitable" border="1"
Calls the same func as [[#DecodeInterleavedForMultiStream]] internally with flag=0 and out_u64_ptr=NULL.
|-
! Cmd || Name
|-
| 0 || RequestSuspendAudioForDebug
|-
| 1 || RequestResumeAudioForDebug
|}


= (S2) aud:u =
=== SetContextForMultiStream ===
This is "nn::audio::IUserClientSession".
Takes a type-0x5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder.


{| class="wikitable" border="1"
=== DecodeInterleavedWithPerfOld ===
|-
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.
! Cmd || Name
|-
| 0 ||
|-
| 1 ||
|-
| 2 ||
|-
| 3 ||
|}


== Cmd0 ==
The output u64 is ignored by official user-processes.
No input, returns an output [[#audin:u|IAudioInManager]].


== Cmd1 ==
Calls the same func as [[#DecodeInterleaved]] internally with flag=0.
No input, returns an output [[#audout:u|IAudioOutManager]].
 
=== DecodeInterleavedForMultiStreamWithPerfOld ===
Takes a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.
 
The output u64 is ignored by official user-processes.
 
Calls the same func as [[#DecodeInterleavedForMultiStream]] internally with flag=0.
 
=== DecodeInterleaved ===
Takes an input u8 bool flag, a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.
 
The bool flag indicates whether or not a reset of the decoder context is being requested.


== Cmd2 ==
=== DecodeInterleavedForMultiStream ===
No input, returns an output [[#audren:u|IAudioRendererManager]].
Takes an input u8 bool flag, a type-0x5 input buffer ('''OpusDataIn''') and a type-0x46 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''', s32 '''DecodedSampleCount''', and an u64.


== Cmd3 ==
The bool flag indicates whether or not a reset of the decoder context is being requested.
No input, returns an output [[#ISpatialDownmixOutputModeManager|ISpatialDownmixOutputModeManager]].


=== ISpatialDownmixOutputModeManager ===
== IClientSession ==
This is "nn::audio::detail::ISpatialDownmixOutputModeManager".
This is "nn::codec::hwacod::IClientSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,062: Line 1,086:
|-
|-
| 0 ||  
| 0 ||  
|}
|-
| 1 ||
|-
| 10 ||
|}


==== Cmd0 ====
=== Cmd10 ===
Takes a PID, an u32, u64, no output.
Takes {...}, returns an [[#IHardwareAudioCodecManagerSession|IHardwareAudioCodecManagerSession]].


= (S2) auddmg:u =
=== IHardwareAudioCodecManagerSession ===
This is "nn::audio::devmgr::IUserSessionManager".
This is "nn::codec::hwacod::IHardwareAudioCodecManagerSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,075: Line 1,103:
|-
|-
| 0 ||  
| 0 ||  
|-
| 1 ||
|-
| 10 ||
|}
|}


== Cmd0 ==
= auddebug =
Takes a PID, an u32, an u64 pid_reserved, returns an output [[#IUserSession|IUserSession]].
This is "nn::audio::detail::IAudioDebugManager".


=== IUserSession ===
This service doesn't exist in retail units.
This is "nn::audio::devmgr::IUserSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,087: Line 1,118:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 ||  
| 0 || ProfilerStart
|-
|-
| 100 ||  
| 1 || ProfilerStop
|-
|-
| 200 ||  
| 2 || CpuProfilerStart
|-
|-
| 300 ||  
| 3 || CpuProfilerStop
|}
 
= aud:a =
This is "nn::audio::detail::IAudioSystemManagerForApplet".
 
This was added with [11.0.0+].
 
{| class="wikitable" border="1"
|-
|-
| 401 ||  
! Cmd || Name
|-
|-
| 500 ||  
| 0 || RegisterAppletResourceUserId
|-
|-
| 600 ||  
| 1 || UnregisterAppletResourceUserId
|-
|-
| 700 ||  
| 2 || RequestSuspendAudio
|-
|-
| 800 ||  
| 3 || RequestResumeAudio
|-
|-
| 900 ||  
| 4 || GetAudioOutputProcessMasterVolume
|-
|-
| 1000 ||  
| 5 || SetAudioOutputProcessMasterVolume
|-
|-
| 1500 ||  
| 6 || GetAudioInputProcessMasterVolume
|-
|-
| 1550 ||  
| 7 || SetAudioInputProcessMasterVolume
|-
| 8 || GetAudioOutputProcessRecordVolume
|-
|-
| 1600 ||  
| 9 || SetAudioOutputProcessRecordVolume
|-
|-
| 2000 ||  
| 10 || [18.0.0-19.0.1] GetAppletStateSummaries
|}
 
= aud:d =
This is "nn::audio::detail::IAudioSystemManagerForDebugger".
 
This was added with [11.0.0+].
 
{| class="wikitable" border="1"
|-
|-
| 2100 ||  
! Cmd || Name
|-
|-
| 2200 ||  
| 0 || RequestSuspendAudioForDebug
|-
|-
| 2301 ||  
| 1 || RequestResumeAudioForDebug
|}
|}


= (S2) audsmx:u =
= (S2) aud:u =
This is "nn::audio::sysmix::IUserSessionManager".
This is "nn::audio::IUserClientSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,132: Line 1,181:
|-
|-
| 0 ||  
| 0 ||  
|}
== Cmd0 ==
Takes a PID, a Process handle, an u32, an u64 pid_reserved, returns an output [[#IUserSession_2|IUserSession]].
=== IUserSession ===
This is "nn::audio::sysmix::IUserSession".
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
|-
| 1 ||  
| 1 ||  
Line 1,151: Line 1,189:
|}
|}


==== Cmd1 ====
== Cmd0 ==
Takes a type-0x5 input buffer, two input u32s, 3 u64s, returns an output [[#IExternalStreamSession|IExternalStreamSession]].
No input, returns an output [[#audin:u|IAudioInManager]].


==== Cmd2 ====
== Cmd1 ==
Takes a type-0x5 input buffer, no output.
No input, returns an output [[#audout:u|IAudioOutManager]].


==== Cmd3 ====
== Cmd2 ==
Takes a type-0x5 input buffer, no output.
No input, returns an output [[#audren:u|IAudioRendererManager]].


==== IExternalStreamSession ====
== Cmd3 ==
This is "nn::audio::sysmix::IExternalStreamSession".
No input, returns an output [[#ISpatialDownmixOutputModeManager|ISpatialDownmixOutputModeManager]].
 
=== ISpatialDownmixOutputModeManager ===
This is "nn::audio::detail::ISpatialDownmixOutputModeManager".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,168: Line 1,209:
|-
|-
| 0 ||  
| 0 ||  
|}
==== Cmd0 ====
Takes a PID, an u32, u64, no output.
= (S2) auddmg:u =
This is "nn::audio::devmgr::IUserSessionManager".
{| class="wikitable" border="1"
|-
|-
| 1 ||  
! Cmd || Name
|-
|-
| 2 ||  
| 0 ||  
|}
 
== Cmd0 ==
Takes a PID, an u32, an u64 pid_reserved, returns an output [[#IUserSession|IUserSession]].
 
=== IUserSession ===
This is "nn::audio::devmgr::IUserSession".
 
{| class="wikitable" border="1"
|-
|-
| 3 ||  
! Cmd || Name
|-
|-
| 4 ||  
| 0 ||  
|-
|-
| 5 ||  
| 100 ||  
|-
|-
| 6 ||  
| 200 ||  
|-
|-
| 7 ||  
| 300 ||  
|-
|-
| 8 ||  
| 401 ||  
|-
|-
| 9 ||  
| 500 ||  
|-
|-
| 10 ||  
| 600 ||  
|-
|-
| 11 ||  
| 700 ||  
|-
|-
| 12 ||  
| 800 ||  
|}
 
= SampleFormat =
This is "nn::audio::SampleFormat".
 
{| class="wikitable" border="1"
|-
|-
! Value || Name
| 900 ||
|-
| 1000 ||  
|-
|-
| 0 || Invalid
| 1500 ||  
|-
|-
| 1 || PcmInt8
| 1550 ||  
|-
|-
| 2 || PcmInt16
| 1600 ||  
|-
|-
| 3 || PcmInt24
| 2000 ||  
|-
|-
| 4 || PcmInt32
| 2100 ||  
|-
|-
| 5 || PcmFloat
| 2200 ||  
|-
|-
| 6 || Adpcm
| 2301 ||  
|}
|}


= AudioOutState =
= (S2) auddmg:s =
This is "nn::audio::AudioOutState".
This is "nn::audio::devmgr::ISystemSessionManager".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value || Name
! Cmd || Name
|-
|-
| 0 || Started
| 0 ||  
|-
| 1 || Stopped
|}
|}


= AudioInState =
== Cmd0 ==
This is "nn::audio::AudioInState".
Takes a PID, an u32, an u64 pid_reserved, returns an output [[#ISystemSession|ISystemSession]].
 
== ISystemSession ==
This is "nn::audio::devmgr::ISystemSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value || Name
! Cmd || Name
|-
| 0 || ListPhysicalDeviceNames
|-
|-
| 0 || Started
| 1 || EnableSoundDriver
|-
|-
| 1 || Stopped
| 2 || DisableSoundDriver
|}
 
= FinalOutputRecorderState =
This is "nn::audio::FinalOutputRecorderState".
 
{| class="wikitable" border="1"
|-
|-
! Value || Name
| 3 || IsSoundDriverEnabled
|-
|-
| 0 || Started
| 4 || ListPhysicalDeviceIds
|-
|-
| 1 || Stopped
| 5 || GetPhysicalDeviceId
|}
 
= AudioOutInfo =
This is "nn::audio::AudioOutInfo".
 
{| class="wikitable" border="1"
|-
|-
! Offset
| 6 || GetPhysicalDeviceProfile
! Size
! Description
|-
|-
| 0x0
| 7 || MapRawInputDevice
| 0x100
|-
| Name
| 8 || MapAndBindPhysicalDevice
|}
 
= AudioInInfo =
This is "nn::audio::AudioInInfo".
 
{| class="wikitable" border="1"
|-
|-
! Offset
| 9 || UnmapPhysicalDevice
! Size
! Description
|-
|-
| 0x0
| 10 || GetBoundPhysicalDeviceProfile
| 0x100
| Name
|}
 
= AudioOutParameter =
This is "nn::audio::AudioOutParameter".
 
{| class="wikitable" border="1"
|-
|-
! Offset
| 11 || GetRawInputPhysicalDeviceProfile
! Size
! Description
|-
|-
| 0x0
| 12 || SetVirtualDeviceGain
| 0x4
|-
| SampleRate
| 13 || GetVirtualDeviceGain
|-
| 14 || SetAppletVirtualDeviceGain
|-
|-
| 0x4
| 15 || GetAppletVirtualDeviceGain
| 0x2
| ChannelCount
|-
|-
| 0x6
| 16 || SetAppletCaptureDeviceGain
| 0x2
| Reserved
|}
 
= AudioInParameter =
This is "nn::audio::AudioInParameter".
 
{| class="wikitable" border="1"
|-
|-
! Offset
| 17 || GetAppletCaptureDeviceGain
! Size
! Description
|-
|-
| 0x0
| 18 || SetAppletBiquadFilterMode
| 0x4
| SampleRate
|-
|-
| 0x4
| 19 || SetAppletBiquadFilterParameters
| 0x2
| ChannelCount
|-
|-
| 0x6
| 20 || GetAppletBiquadFilterParameters
| 0x2
|-
| Reserved
| 21 || SuspendAppletVirtualDevice
|}
|-
 
| 22 || ResumeAppletVirtualDevice
= AudioOutParameterInternal =
|-
This is "nn::audio::detail::AudioOutParameterInternal".
| 23 || SetPhysicalDeviceGain
 
{| class="wikitable" border="1"
|-
|-
! Offset
| 24 || GetPhysicalDeviceGain
! Size
! Description
|-
|-
| 0x0
| 25 || SetPhysicalDeviceFeature
| 0x4
| SampleRate
|-
|-
| 0x4
| 26 || GetPhysicalDeviceFeature
| 0x4
| ChannelCount
|-
|-
| 0x8
| 27 || SetGlobalPhysicalDeviceFeature
| 0x4
| SampleFormat
|-
|-
| 0xC
| 28 || GetGlobalPhysicalDeviceFeature
| 0x4
|-
| State
| 29 || AcquireGlobalPhysicalDeviceEvent
|-
| 30 || ReleaseGlobalPhysicalDeviceEvent
|-
| 31 || BindPhysicalDevice
|-
| 32 || SetMonauralDownmixMode
|-
| 33 || SetControl
|-
| 34 || GetMonauralDownmixMode
|-
| 35 || GetControl
|-
| 36 || ShellCommand
|-
| 37 || SetAppletVirtualDeviceLoudnessNormalization
|-
| 38 || GetAppletVirtualDeviceLoudnessNormalization
|-
| 39 || SetLoudnessNormalizationParameters
|-
| 40 || GetLoudnessNormalizationParameters
|-
| 41 || GetLoudnessNormalizationStatistics
|-
| 42 || SetAppletVirtualDeviceLoudnessNormalizationBiasParameters
|-
| 43 || GetAppletVirtualDeviceLoudnessNormalizationBiasParameters
|-
| 44 || SetAppletVirtualDevicePostGain
|-
| 45 || GetAppletVirtualDevicePostGain
|-
| 46 || UnbindVirtualDevice
|}
|}


= AudioInParameterInternal =
= (S2) audsmx:u =
This is "nn::audio::detail::AudioInParameterInternal".
This is "nn::audio::sysmix::IUserSessionManager".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Cmd || Name
! Size
! Description
|-
|-
| 0x0
| 0 ||  
| 0x4
| SampleRate
|-
| 0x4
| 0x4
| ChannelCount
|-
| 0x8
| 0x4
| SampleFormat
|-
| 0xC
| 0x4
| State
|}
|}


= AudioOutBuffer =
== Cmd0 ==
This is "nn::audio::AudioOutBuffer".
Takes a PID, a Process handle, an u32, an u64 pid_reserved, returns an output [[#IUserSession_2|IUserSession]].
 
Official sw uses hard-coded value 0x1 for the u32.
 
An error is returned when there's already an [[#IUserSession|IUserSession]] open with the same PID.
 
=== IUserSession ===
This is "nn::audio::sysmix::IUserSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Cmd || Name
! Size
! Description
|-
|-
| 0x0
| 1 ||  
| 0x8
| Pointer to next buffer (unused)
|-
|-
| 0x8
| 2 ||  
| 0x8
| Pointer to sample buffer
|-
|-
| 0x10
| 3 ||  
| 0x8
| Capacity of sample buffer
|-
| 0x18
| 0x8
| Size of data in the sample buffer
|-
| 0x20
| 0x8
| Offset of data in the sample buffer (unused/ignored?)
|}
|}


= AudioInBuffer =
==== Cmd1 ====
This is "nn::audio::AudioInBuffer".
Takes a type-0x5 input buffer, two input u32s, 3 u64s, returns an output [[#IExternalStreamSession|IExternalStreamSession]].
 
==== Cmd2 ====
Takes a type-0x5 input buffer, no output.
 
==== Cmd3 ====
Takes a type-0x5 input buffer, no output.
 
==== IExternalStreamSession ====
This is "nn::audio::sysmix::IExternalStreamSession".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Cmd || Name
! Size
! Description
|-
|-
| 0x0
| 0 ||  
| 0x8
| Pointer to next buffer (unused)
|-
|-
| 0x8
| 1 ||  
| 0x8
| Pointer to sample buffer
|-
|-
| 0x10
| 2 ||  
| 0x8
| Capacity of sample buffer
|-
|-
| 0x18
| 3 ||  
| 0x8
| Size of data in the sample buffer
|-
|-
| 0x20
| 4 ||  
| 0x8
| Offset of data in the sample buffer (unused/ignored?)
|}
 
= FinalOutputRecorderBuffer =
This is "nn::audio::FinalOutputRecorderBuffer".
 
{| class="wikitable" border="1"
|-
|-
! Offset
| 5 ||
! Size
! Description
|-
|-
| 0x0
| 6 ||  
| 0x8
| Released
|-
|-
| 0x8
| 7 ||  
| 0x8
| Pointer to next buffer (unused)
|-
|-
| 0x10
| 8 ||
| 0x8
|-
| Pointer to sample buffer
| 9 ||
|-
|-
| 0x18
| 10 ||  
| 0x8
| Capacity of sample buffer
|-
|-
| 0x20
| 11 ||  
| 0x8
| Size of data in the sample buffer
|-
|-
| 0x28
| 12 ||  
| 0x8
| Offset of data in the sample buffer (unused/ignored?)
|}
|}


= FinalOutputRecorderParameter =
= SampleFormat =
This is "nn::audio::FinalOutputRecorderParameter".
This is "nn::audio::SampleFormat".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Value || Name
! Size
! Description
|-
|-
| 0x0
| 0 || Invalid
| 0x4
|-
| SampleRate
| 1 || PcmInt8
|-
| 2 || PcmInt16
|-
| 3 || PcmInt24
|-
| 4 || PcmInt32
|-
| 5 || PcmFloat
|-
| 6 || Adpcm
|}
|}


= FinalOutputRecorderParameterInternal =
= AudioOutState =
This is "nn::audio::detail::FinalOutputRecorderParameterInternal".
This is "nn::audio::AudioOutState".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Value || Name
! Size
! Description
|-
|-
| 0x0
| 0 || Started
| 0x4
|-
| SampleRate
| 1 || Stopped
|}
 
= AudioInState =
This is "nn::audio::AudioInState".
 
{| class="wikitable" border="1"
|-
|-
| 0x4
! Value || Name
| 0x4
| ChannelCount
|-
|-
| 0x8
| 0 || Started
| 0x4
| SampleFormat
|-
|-
| 0xC
| 1 || Stopped
| 0x4
| State
|}
|}


= FinalOutputRecorderWorkBufferParameterInternal =
= FinalOutputRecorderState =
This is "nn::audio::detail::FinalOutputRecorderWorkBufferParameterInternal".
This is "nn::audio::FinalOutputRecorderState".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset
! Value || Name
! Size
! Description
|-
|-
| 0x0
| 0 || Started
| 0x8
|  
|-
|-
| 0x8
| 1 || Stopped
| 0x8
|
|-
| 0x10
| 0x8
|  
|}
|}


= OpusParametersEx =
= AudioOutInfo =
This is "nn::audio::AudioOutInfo".
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,540: Line 1,528:
|-
|-
| 0x0
| 0x0
| 0x4
| 0x100
| SampleRate
| Name
|-
|}
| 0x4
 
| 0x4
= AudioInInfo =
| ChannelCount
This is "nn::audio::AudioInInfo".
 
{| class="wikitable" border="1"
|-
|-
| 0x8
! Offset
| 0x4
! Size
| UseLargeFrameSize
! Description
|-
|-
| 0xC
| 0x0
| 0x4
| 0x100
| Padding
| Name
|}
|}


= OpusMultiStreamParameters =
= AudioOutParameter =
This is "nn::audio::AudioOutParameter".
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,568: Line 1,560:
|-
|-
| 0x4
| 0x4
| 0x4
| 0x2
| ChannelCount
| ChannelCount
|-
|-
| 0x8
| 0x6
| 0x4
| 0x2
| Number of streams
| Reserved
|-
| 0xC
| 0x4
| Number of stereo streams
|-
| 0x10
| 0x100
| u8 array of channel mappings
|}
|}


= OpusMultiStreamParametersEx =
= AudioInParameter =
This is "nn::audio::AudioInParameter".
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 1,596: Line 1,582:
|-
|-
| 0x4
| 0x4
| 0x4
| 0x2
| ChannelCount
| ChannelCount
|-
|-
| 0x8
| 0x6
| 0x4
| 0x2
| Number of streams
| Reserved
|}
 
= AudioOutParameterInternal =
This is "nn::audio::detail::AudioOutParameterInternal".
 
{| class="wikitable" border="1"
|-
|-
| 0xC
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| 0x4
| Number of stereo streams
| SampleRate
|-
|-
| 0x10
| 0x4
| 0x4
| UseLargeFrameSize
| 0x4
| ChannelCount
|-
|-
| 0x14
| 0x8
| 0x4
| 0x4
| Padding
| SampleFormat
|-
|-
| 0x18
| 0xC
| 0x100
| 0x4
| u8 array of channel mappings
| State
|}
|}


= BehaviorInfo Revision =
= AudioInParameterInternal =
This is the revision field used with audren. This controls which format is used for the data used with [[#IAudioRenderer|IAudioRenderer]] RequestUpdate*, etc.
This is "nn::audio::detail::AudioInParameterInternal".
 
Bitmask 0xFFFFFF == 0x564552 (REV) is used for determining whether the user-process is using NX-platform. On Ounce, the revision value is identical except that bitmask 0xFFFFFF is 0x764552 (REv).


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! System Version
! Offset
! Value
! Size
! Required by
! Description
|-
|-
| [1.0.0+]
| 0x0
| 0x31564552 (REV1)
| 0x4
| IsAudioRenererProcessingTimeLimit70PercentSupported
| SampleRate
|-
|-
| [2.0.0+]
| 0x4
| 0x32564552 (REV2)
| 0x4
| IsAdpcmLoopContextBugFixed, IsSplitterSupported
| ChannelCount
|-
|-
| [3.0.0+]
| 0x8
| 0x33564552 (REV3)
| 0x4
| IsLongSizePreDelaySupported
| SampleFormat
|-
| 0xC
| 0x4
| State
|}
 
= AudioOutBuffer =
This is "nn::audio::AudioOutBuffer".
 
{| class="wikitable" border="1"
|-
|-
| [4.0.0+]
! Offset
| 0x34564552 (REV4)
! Size
| IsAudioRenererProcessingTimeLimit75PercentSupported
! Description
|-
|-
| [6.0.0+]
| 0x0
| 0x35564552 (REV5)
| 0x8
|
| Pointer to next buffer (unused)
* IsAudioRenererProcessingTimeLimit80PercentSupported
* IsCommandProcessingTimeEstimatorVersion2Supported
* IsVariadicCommandBufferSizeSupported
* IsFlushVoiceWaveBuffersSupported
* IsSplitterBugFixed
* IsElapsedFrameCountSupported
* IsPerformanceMetricsDataFormatVersion2Supported
* GetPerformanceMetricsDataFormat
* IsVoicePitchAndSrcSkippedSupported
* IsVoicePlayedSampleCountResetAtLoopPointSupported
|-
|-
| [6.1.0+]
| 0x8
| 0x36564552 (REV6)
| 0x8
| IsBiquadFilterEffectStateClaerBugFixed
| Pointer to sample buffer
|-
|-
| [7.0.0+]
| 0x10
| 0x37564552 (REV7)
| 0x8
|
| Capacity of sample buffer
* IsVolumeMixParameterPrecisionQ23Supported
* UseBiquadFilterFloatProcessing
* IsMixInParameterDirtyOnlyUpdateSupported
|-
|-
| [9.0.0+]
| 0x18
| 0x38564552 (REV8)
| 0x8
|
| Size of data in the sample buffer
* IsWaveBufferVer2Supported
|-
* IsCommandProcessingTimeEstimatorVersion3Supported
| 0x20
| 0x8
| Offset of data in the sample buffer (unused/ignored?)
|}
 
= AudioInBuffer =
This is "nn::audio::AudioInBuffer".
 
{| class="wikitable" border="1"
|-
|-
| [12.0.0+]
! Offset
| 0x39564552 (REV9)
! Size
| IsEffectInfoVersion2Supported
! Description
|-
|-
| [13.0.0+]
| 0x0
| 0x3A564552
| 0x8
| Pointer to next buffer (unused)
|-
| 0x8
| 0x8
| Pointer to sample buffer
|-
| 0x10
| 0x8
| Capacity of sample buffer
|-
| 0x18
| 0x8
| Size of data in the sample buffer
|-
| 0x20
| 0x8
| Offset of data in the sample buffer (unused/ignored?)
|}
 
= FinalOutputRecorderBuffer =
This is "nn::audio::FinalOutputRecorderBuffer".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x8
| Released
|-
| 0x8
| 0x8
| Pointer to next buffer (unused)
|-
| 0x10
| 0x8
| Pointer to sample buffer
|-
| 0x18
| 0x8
| Capacity of sample buffer
|-
| 0x20
| 0x8
| Size of data in the sample buffer
|-
| 0x28
| 0x8
| Offset of data in the sample buffer (unused/ignored?)
|}
 
= FinalOutputRecorderParameter =
This is "nn::audio::FinalOutputRecorderParameter".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| SampleRate
|}
 
= FinalOutputRecorderParameterInternal =
This is "nn::audio::detail::FinalOutputRecorderParameterInternal".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| SampleRate
|-
| 0x4
| 0x4
| ChannelCount
|-
| 0x8
| 0x4
| SampleFormat
|-
| 0xC
| 0x4
| State
|}
 
= FinalOutputRecorderWorkBufferParameterInternal =
This is "nn::audio::detail::FinalOutputRecorderWorkBufferParameterInternal".
 
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x8
|
|-
| 0x8
| 0x8
|
|-
| 0x10
| 0x8
|
|}
 
= OpusParametersEx =
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| SampleRate
|-
| 0x4
| 0x4
| ChannelCount
|-
| 0x8
| 0x4
| UseLargeFrameSize
|-
| 0xC
| 0x4
| Padding
|}
 
= OpusMultiStreamParameters =
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| SampleRate
|-
| 0x4
| 0x4
| ChannelCount
|-
| 0x8
| 0x4
| Number of streams
|-
| 0xC
| 0x4
| Number of stereo streams
|-
| 0x10
| 0x100
| u8 array of channel mappings
|}
 
= OpusMultiStreamParametersEx =
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x4
| SampleRate
|-
| 0x4
| 0x4
| ChannelCount
|-
| 0x8
| 0x4
| Number of streams
|-
| 0xC
| 0x4
| Number of stereo streams
|-
| 0x10
| 0x4
| UseLargeFrameSize
|-
| 0x14
| 0x4
| Padding
|-
| 0x18
| 0x100
| u8 array of channel mappings
|}
 
= BehaviorInfo Revision =
This is the revision field used with audren. This controls which format is used for the data used with [[#IAudioRenderer|IAudioRenderer]] RequestUpdate*, etc.
 
Bitmask 0xFFFFFF == 0x564552 (REV) is used for determining whether the user-process is using NX-platform. On Ounce, the revision value is identical except that bitmask 0xFFFFFF is 0x764552 (REv). The latter is only supported on S2.
 
GetWorkBufferSize/OpenAudioRenderer validate the revision, with an error being thrown if invalid (unrecognized top-byte / low-bitmask is unrecognized).
 
{| class="wikitable" border="1"
|-
! System Version
! Value
! Required by
|-
| [1.0.0+]
| 0x31564552 (REV1)
| IsAudioRenererProcessingTimeLimit70PercentSupported
|-
| [2.0.0+]
| 0x32564552 (REV2)
| IsAdpcmLoopContextBugFixed, IsSplitterSupported
|-
| [3.0.0+]
| 0x33564552 (REV3)
| IsLongSizePreDelaySupported
|-
| [4.0.0+]
| 0x34564552 (REV4)
| IsAudioRenererProcessingTimeLimit75PercentSupported
|-
| [6.0.0+]
| 0x35564552 (REV5)
|
|
* UseMultiTapBiquadFilterProcessing
* IsAudioRenererProcessingTimeLimit80PercentSupported
* IsCommandProcessingTimeEstimatorVersion4Supported
* IsCommandProcessingTimeEstimatorVersion2Supported
* IsDeviceApiVersion2Supported
* IsVariadicCommandBufferSizeSupported
|-
* IsFlushVoiceWaveBuffersSupported
| [14.0.0+]
* IsSplitterBugFixed
| 0x3B564552
* IsElapsedFrameCountSupported
|
* IsPerformanceMetricsDataFormatVersion2Supported
* IsDelayChannelMappingChanged
* GetPerformanceMetricsDataFormat
* IsReverbChannelMappingChanged
* IsVoicePitchAndSrcSkippedSupported
* IsI3dl2ReverbChannelMappingChanged
* IsVoicePlayedSampleCountResetAtLoopPointSupported
* IsCommandProcessingTimeEstimatorVersion5Supported
|-
|-
| [6.1.0+]
| [17.0.0+]
| 0x36564552 (REV6)
| 0x3C564552
| IsBiquadFilterEffectStateClaerBugFixed
| IsBiquadFilterParameterForSplitterEnabled
|-
| [7.0.0+]
| 0x37564552 (REV7)
|
* IsVolumeMixParameterPrecisionQ23Supported
* UseBiquadFilterFloatProcessing
* IsMixInParameterDirtyOnlyUpdateSupported
|-
| [9.0.0+]
| 0x38564552 (REV8)
|
* IsWaveBufferVer2Supported
* IsCommandProcessingTimeEstimatorVersion3Supported
|-
| [12.0.0+]
| 0x39564552 (REV9)
| IsEffectInfoVersion2Supported
|-
| [13.0.0+]
| 0x3A564552
|
* UseMultiTapBiquadFilterProcessing
* IsCommandProcessingTimeEstimatorVersion4Supported
* IsDeviceApiVersion2Supported
|-
| [14.0.0+]
| 0x3B564552
|
* IsDelayChannelMappingChanged
* IsReverbChannelMappingChanged
* IsI3dl2ReverbChannelMappingChanged
* IsCommandProcessingTimeEstimatorVersion5Supported
|-
| [17.0.0+]
| 0x3C564552
| IsBiquadFilterParameterForSplitterEnabled
|-
| [18.0.0+]
| 0x3D564552
| IsSplitterPrevVolumeResetSupported
|-
|
| 0x3E564552
| IsSplitterDepopBugFixEnabled
|-
| [19.0.0+]
| 0x3F564552
| IsBiquadFilterParameterFloatSupported
|-
|-
| [18.0.0+]
| [22.0.0+]
| 0x3D564552
| 0x40564552
| IsSplitterPrevVolumeResetSupported
| IsVoiceBiquadFilterCrossFadeCurveEnabled
|-
|
| 0x3E564552
| IsSplitterDepopBugFixEnabled
|-
| [19.0.0+]
| 0x3F564552
| IsBiquadFilterParameterFloatSupported
|}
|}