Line 47: |
Line 47: |
| | | |
| == OpenAudioOutAuto == | | == OpenAudioOutAuto == |
− | Same as [[#OpenAudioOut]], but takes a type-0x21 input buffer instead. | + | Same as [[#OpenAudioOut]], but takes a type-0x21 input buffer and a type-0x22 output buffer instead. |
| | | |
| == IAudioOut == | | == IAudioOut == |
Line 145: |
Line 145: |
| |- | | |- |
| | 4 || [3.0.0+] ListAudioInsAutoFiltered | | | 4 || [3.0.0+] ListAudioInsAutoFiltered |
| + | |- |
| + | | 5 || [5.0.0+] |
| |} | | |} |
| | | |
Line 226: |
Line 228: |
| |- | | |- |
| | 10 || [6.0.0+] FlushFinalOutputRecorderBuffers | | | 10 || [6.0.0+] FlushFinalOutputRecorderBuffers |
| + | |- |
| + | | 11 || [9.0.0+] |
| + | |} |
| + | |
| + | = auddev = |
| + | This is "nn::audio::detail::IAudioSnoopManager". |
| + | |
| + | This was added with [6.0.0+]. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Cmd || Name |
| + | |- |
| + | | 0 || EnableDspUsageMeasurement |
| + | |- |
| + | | 1 || DisableDspUsageMeasurement |
| + | |- |
| + | | 6 || GetDspUsage |
| |} | | |} |
| | | |
Line 237: |
Line 257: |
| | 0 || OpenAudioRenderer | | | 0 || OpenAudioRenderer |
| |- | | |- |
− | | 1 || GetAudioRendererWorkBufferSize | + | | 1 || GetWorkBufferSize |
| |- | | |- |
| | 2 || [[#GetAudioDeviceService]] | | | 2 || [[#GetAudioDeviceService]] |
| |- | | |- |
− | | 3 || [3.0.0+] OpenAudioRendererAuto | + | | 3 || [3.0.0+] OpenAudioRendererForManualExecution |
| |- | | |- |
| | 4 || [4.0.0+] GetAudioDeviceServiceWithRevisionInfo | | | 4 || [4.0.0+] GetAudioDeviceServiceWithRevisionInfo |
Line 334: |
Line 354: |
| | | |
| === ListAudioDeviceName === | | === ListAudioDeviceName === |
− | Takes a type-0x6 output buffer containing an array of '''DeviceName''', returns an output u32 for total number of output entries. | + | Takes a type-0x6 output buffer containing an array of '''DeviceName''', returns an output s32 for total number of output entries. |
| | | |
| === SetAudioDeviceOutputVolume === | | === SetAudioDeviceOutputVolume === |
Line 343: |
Line 363: |
| | | |
| === ListAudioDeviceNameAuto === | | === ListAudioDeviceNameAuto === |
− | Takes a type-0x22 output buffer containing an array of '''DeviceName''', returns an output u32 for total number of output entries. | + | Takes a type-0x22 output buffer containing an array of '''DeviceName''', returns an output s32 for total number of output entries. |
| | | |
| === SetAudioDeviceOutputVolumeAuto === | | === SetAudioDeviceOutputVolumeAuto === |
Line 370: |
Line 390: |
| | 5 || [4.0.0+] SetAudioOutsProcessRecordVolume | | | 5 || [4.0.0+] SetAudioOutsProcessRecordVolume |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspendAudioOuts/RequestResumeAudioOuts no longer returns an output handle. |
| | | |
| = audin:a = | | = audin:a = |
Line 386: |
Line 408: |
| | 3 || SetAudioInsProcessMasterVolume | | | 3 || SetAudioInsProcessMasterVolume |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspendAudioIns/RequestResumeAudioIns no longer returns an output handle. |
| | | |
| = audrec:a = | | = audrec:a = |
Line 398: |
Line 422: |
| | 1 || RequestResumeFinalOutputRecorders | | | 1 || RequestResumeFinalOutputRecorders |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspendFinalOutputRecorders/RequestResumeFinalOutputRecorders no longer returns an output handle. |
| | | |
| = audren:a = | | = audren:a = |
Line 422: |
Line 448: |
| | 7 || [4.0.0+] SetAudioRenderersProcessRecordVolume | | | 7 || [4.0.0+] SetAudioRenderersProcessRecordVolume |
| |} | | |} |
| + | |
| + | [4.0.0+] RequestSuspendAudioRenderers/RequestResumeAudioRenderers no longer returns an output handle. |
| | | |
| = audout:d, audin:d, audrec:d, audren:d = | | = audout:d, audin:d, audrec:d, audren:d = |
Line 501: |
Line 529: |
| |- | | |- |
| | 26 || [4.0.0+] UpdateHeadphoneSettings | | | 26 || [4.0.0+] UpdateHeadphoneSettings |
| + | |- |
| + | | 27 || [7.0.0+] SetVolumeMappingTableForDev |
| |} | | |} |
| | | |
Line 589: |
Line 619: |
| | 1 || [[#GetWorkBufferSize]] | | | 1 || [[#GetWorkBufferSize]] |
| |- | | |- |
− | | 2 || [3.0.0+] OpenHardwareOpusDecoderForMultiStream | + | | 2 || [3.0.0+] [[#OpenHardwareOpusDecoderForMultiStream]] |
| |- | | |- |
− | | 3 || [3.0.0+] GetWorkBufferSizeForMultiStream | + | | 3 || [3.0.0+] [[#GetWorkBufferSizeForMultiStream]] |
| |} | | |} |
| | | |
Line 597: |
Line 627: |
| | | |
| == Initialize == | | == Initialize == |
− | Takes two u32s '''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. | + | 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. |
| | | |
| == GetWorkBufferSize== | | == GetWorkBufferSize== |
− | Takes two u32s '''SampleRate''' and '''ChannelCount''' packed as an u64. Returns the required size for the decoder's work buffer. | + | 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. |
| + | |
| + | == OpenHardwareOpusDecoderForMultiStream == |
| + | 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. |
| + | |
| + | The input buffer is a [[#MultiStreamParameters]] 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. |
| + | |
| + | == GetWorkBufferSizeForMultiStream == |
| + | 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 input buffer is a [[#MultiStreamParameters]] struct. |
| + | |
| + | == MultiStreamParameters == |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | Sample rate (Hz) |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | Number of channels |
| + | |- |
| + | | 0x8 |
| + | | 0x4 |
| + | | Number of streams |
| + | |- |
| + | | 0xC |
| + | | 0x4 |
| + | | Number of stereo streams |
| + | |- |
| + | | 0x10 |
| + | | 0x100 |
| + | | u8 array of channel mappings |
| + | |} |
| | | |
| == IHardwareOpusDecoder == | | == IHardwareOpusDecoder == |
Line 613: |
Line 681: |
| | 1 || [[#SetContext]] | | | 1 || [[#SetContext]] |
| |- | | |- |
− | | 2 || [4.0.0+] DecodeInterleavedForMultiStreamOld ([3.0.0-3.0.2] DecodeInterleavedForMultiStream) | + | | 2 || [4.0.0+] [[#DecodeInterleavedForMultiStreamOld]] ([3.0.0-3.0.2] DecodeInterleavedForMultiStream) |
| + | |- |
| + | | 3 || [3.0.0+] [[#SetContextForMultiStream]] |
| + | |- |
| + | | 4 || [6.0.0+] [[#DecodeInterleavedWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedWithPerf) |
| |- | | |- |
− | | 3 || [3.0.0+] SetContextForMultiStream | + | | 5 || [6.0.0+] [[#DecodeInterleavedForMultiStreamWithPerfOld]] ([4.0.0-5.1.0] DecodeInterleavedForMultiStreamWithPerf) |
| |- | | |- |
− | | 4 || [6.0.0+] DecodeInterleavedWithPerfOld ([4.0.0-5.1.0] DecodeInterleavedWithPerf) | + | | 6 || [6.0.0+] [[#DecodeInterleaved]] |
| |- | | |- |
− | | 5 || [6.0.0+] DecodeInterleavedForMultiStreamWithPerfOld ([4.0.0-5.1.0] DecodeInterleavedForMultiStreamWithPerf) | + | | 7 || [6.0.0+] [[#DecodeInterleavedForMultiStream]] |
| |- | | |- |
− | | 6 || [6.0.0+] DecodeInterleaved | + | | 8 || [7.0.0+] |
| |- | | |- |
− | | 7 || [6.0.0+] DecodeInterleavedForMultiStream | + | | 9 || [7.0.0+] |
| |} | | |} |
| | | |
| === DecodeInterleavedOld === | | === DecodeInterleavedOld === |
− | Takes a type-5 input buffer ('''OpusDataIn''') and a type-6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns two u32s '''DecodedSampleCount''' and '''DecodedDataSize'''. | + | Takes a type-5 input buffer ('''OpusDataIn''') and a type-6 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. |
| | | |
| === SetContext === | | === SetContext === |
| + | Takes a type-5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. The input buffer is unused. |
| + | |
| + | === DecodeInterleavedForMultiStreamOld === |
| + | Takes a type-5 input buffer ('''OpusDataIn''') and a type-6 output buffer ('''PcmDataOut'''). Decodes the Opus source data to PCM and returns output s32 '''DecodedDataSize''' and s32 '''DecodedSampleCount'''. |
| + | |
| + | Calls the same func as [[#DecodeInterleavedForMultiStream]] internally with flag=0 and out_u64_ptr=NULL. |
| + | |
| + | === SetContextForMultiStream === |
| Takes a type-5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. | | Takes a type-5 input buffer ('''DecoderContextIn'''). Sends the unknown context data to the hardware decoder. |
| + | |
| + | === 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. |
| + | |
| + | The output u64 is ignored by official user-processes. |
| + | |
| + | Calls the same func as [[#DecodeInterleaved]] internally with flag=0. |
| + | |
| + | === 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. |
| + | |
| + | === DecodeInterleavedForMultiStream === |
| + | 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. |
| | | |
| = auddebug = | | = auddebug = |