nn_audio_out

Family of src/nx/nn/audio.hook. The hooks_off setting turns a family off by its name.

The native nn::audio (audio.c), for tools/hookgen, in the language of nn/hooks.hook. The audio outs, with no audout:u session: OpenAudioOut and every function that asks the session of the AudioOut it opened. The SDK reads an out's rate, channels, sample format and name from the game's AudioOut itself (GetAudioOutSampleRate and the like, which stay its own code), so OpenAudioOut fills them: the same layout in every SDK read (0.12.16, 3.5.0, 4.4, 6.5.0, 8.2.1, 10.4.0, 13.3, 16.2, 18.3.2, 19.3.3, 20.5), by those accessors' code. The AudioOutBuffer's own functions (SetAudioOutBufferInfo, GetAudioOutBufferDataPointer...) need no session either. A 32-bit game: the functions the 32-bit SDKs read have, under the same symbols: 19 in 0.12.16, those and the flush, the buffer count and the played samples in 4.4.0 (a count of 8 bytes in r0 and r1), and those and the volume's two in 10.6.0. The AudioOut's layout and the AudioOutBuffer's 0x28 bytes are the same there, as their accessors read them, so the ones that use the struct are declared again for a 32-bit game (a32 hook) and the others marked a32; a volume is a float in s0. Each holds below 11.0.0 (a32 @version): read in 0.12.16, 4.4.0 and 10.6.0, which agree, and between them by inference: switchbrew's audout:u shows the commands they send unchanged from 1.0.0 to 10.x (the volume's two from 6.0.0); past 10.6.0 a 32-bit game has no hook here

Page 1 2

struct nn::audio::AudioOut source
FieldTypeOffset
sample_rateu320x0
channel_countu320x4
sample_formatu320x8
stateu320xc
nameu80x10

Size 0x110.

nn::audio::OpenAudioOut(nn::audio::AudioOut*, char const*, nn::audio::AudioOutParameter const&) source

_ZN2nn5audio12OpenAudioOutEPNS0_8AudioOutEPKcRKNS0_17AudioOutParameterE
As C: u32 (addr out, addr name, addr params)
Handler: nnaudio_open_out (audio.c)
Uses: nn::audio::AudioOut

nn::audio::OpenAudioOut(nn::audio::AudioOut*, char const*, nn::audio::AudioOutParameter const&) SDK < 11.0.0 32-bit source

_ZN2nn5audio12OpenAudioOutEPNS0_8AudioOutEPKcRKNS0_17AudioOutParameterE
As C: u32 (addr out, addr name, addr params)
Handler: nnaudio_open_out (audio.c)
Uses: nn::audio::AudioOut

nn::audio::OpenAudioOut(nn::audio::AudioOut*, nn::os::SystemEvent*, char const*, nn::audio::AudioOutParameter const&) source

_ZN2nn5audio12OpenAudioOutEPNS0_8AudioOutEPNS_2os11SystemEventEPKcRKNS0_17AudioOutParameterE
As C: u32 (addr out, addr event, addr name, addr params)
Handler: nnaudio_open_out_event (audio.c)
Uses: nn::audio::AudioOut

nn::audio::OpenAudioOut(nn::audio::AudioOut*, nn::os::SystemEvent*, char const*, nn::audio::AudioOutParameter const&) SDK < 11.0.0 32-bit source

_ZN2nn5audio12OpenAudioOutEPNS0_8AudioOutEPNS_2os11SystemEventEPKcRKNS0_17AudioOutParameterE
As C: u32 (addr out, addr event, addr name, addr params)
Handler: nnaudio_open_out_event (audio.c)
Uses: nn::audio::AudioOut

nn::audio::OpenDefaultAudioOut(nn::audio::AudioOut*, nn::audio::AudioOutParameter const&) source

_ZN2nn5audio19OpenDefaultAudioOutEPNS0_8AudioOutERKNS0_17AudioOutParameterE
As C: u32 (addr out, addr params)
Handler: nnaudio_open_default_out (audio.c)
Uses: nn::audio::AudioOut

nn::audio::OpenDefaultAudioOut(nn::audio::AudioOut*, nn::audio::AudioOutParameter const&) SDK < 11.0.0 32-bit source

_ZN2nn5audio19OpenDefaultAudioOutEPNS0_8AudioOutERKNS0_17AudioOutParameterE
As C: u32 (addr out, addr params)
Handler: nnaudio_open_default_out (audio.c)
Uses: nn::audio::AudioOut

nn::audio::OpenDefaultAudioOut(nn::audio::AudioOut*, nn::os::SystemEvent*, nn::audio::AudioOutParameter const&) source

_ZN2nn5audio19OpenDefaultAudioOutEPNS0_8AudioOutEPNS_2os11SystemEventERKNS0_17AudioOutParameterE
As C: u32 (addr out, addr event, addr params)
Handler: nnaudio_open_default_out_event (audio.c)
Uses: nn::audio::AudioOut

nn::audio::OpenDefaultAudioOut(nn::audio::AudioOut*, nn::os::SystemEvent*, nn::audio::AudioOutParameter const&) SDK < 11.0.0 32-bit source

_ZN2nn5audio19OpenDefaultAudioOutEPNS0_8AudioOutEPNS_2os11SystemEventERKNS0_17AudioOutParameterE
As C: u32 (addr out, addr event, addr params)
Handler: nnaudio_open_default_out_event (audio.c)
Uses: nn::audio::AudioOut

nn::audio::RegisterBufferEvent(nn::audio::AudioOut*, nn::os::SystemEvent*) SDK < 11.0.0 32-bit source

_ZN2nn5audio19RegisterBufferEventEPNS0_8AudioOutEPNS_2os11SystemEventE
As C: void (addr out, addr event)
Handler: nnaudio_register_buffer_event (audio.c)

nn::audio::CloseAudioOut(nn::audio::AudioOut*) source

_ZN2nn5audio13CloseAudioOutEPNS0_8AudioOutE
As C: void (addr out)
Handler: nnaudio_close_out (audio.c)
Uses: nn::audio::AudioOut

nn::audio::CloseAudioOut(nn::audio::AudioOut*) SDK < 11.0.0 32-bit source

_ZN2nn5audio13CloseAudioOutEPNS0_8AudioOutE
As C: void (addr out)
Handler: nnaudio_close_out (audio.c)
Uses: nn::audio::AudioOut

nn::audio::GetAudioOutState(nn::audio::AudioOut const*) source

_ZN2nn5audio16GetAudioOutStateEPKNS0_8AudioOutE
As C: u32 (addr out)
Handler: nnaudio_get_out_state (audio.c)
Uses: nn::audio::AudioOut

nn::audio::GetAudioOutState(nn::audio::AudioOut const*) SDK < 11.0.0 32-bit source

_ZN2nn5audio16GetAudioOutStateEPKNS0_8AudioOutE
As C: u32 (addr out)
Handler: nnaudio_get_out_state (audio.c)
Uses: nn::audio::AudioOut

nn::audio::StartAudioOut(nn::audio::AudioOut*) SDK < 11.0.0 32-bit source

_ZN2nn5audio13StartAudioOutEPNS0_8AudioOutE
As C: u32 (addr out)
Handler: nnaudio_start_out (audio.c)

nn::audio::StopAudioOut(nn::audio::AudioOut*) SDK < 11.0.0 32-bit source

_ZN2nn5audio12StopAudioOutEPNS0_8AudioOutE
As C: void (addr out)
Handler: nnaudio_stop_out (audio.c)

nn::audio::AppendAudioOutBuffer(nn::audio::AudioOut*, nn::audio::AudioOutBuffer*) SDK < 11.0.0 32-bit source

_ZN2nn5audio20AppendAudioOutBufferEPNS0_8AudioOutEPNS0_14AudioOutBufferE
As C: bool (addr out, addr buffer)
Handler: nnaudio_append_out_buffer (audio.c)

nn::audio::GetReleasedAudioOutBuffer(nn::audio::AudioOut*) SDK < 11.0.0 32-bit source

_ZN2nn5audio25GetReleasedAudioOutBufferEPNS0_8AudioOutE
As C: addr (addr out)
Handler: nnaudio_get_released_out_buffer (audio.c)

Page 1 2


Made from ScarletNX's Sail at 166ad3910f80. The hooks' and the SVCs' declarations and their handlers are ScarletNX's (GPL-3.0-or-later); the SVCs' declarations are Eden's, as hos.svc says.