Wii U audio tweaks
Clean-up better, and neaten-up some code
This commit is contained in:
parent
28964f166c
commit
6cc976d4d6
1 changed files with 8 additions and 7 deletions
|
@ -192,8 +192,7 @@ bool AudioBackend_Init(void)
|
|||
|
||||
AXVoiceDeviceMixData mix_data[6];
|
||||
memset(mix_data, 0, sizeof(mix_data));
|
||||
mix_data[0].bus[0].volume = i == 0 ? 0x8000 : 0; // Channel 1 goes on the left speaker
|
||||
mix_data[1].bus[0].volume = i == 1 ? 0x8000 : 0; // Channel 2 goes on the right speaker
|
||||
mix_data[i].bus[0].volume = 0x8000; // Voice 1 goes on the left speaker - voice 2 goes on the right speaker
|
||||
|
||||
AXSetVoiceDeviceMix(voices[i], AX_DEVICE_TYPE_DRC, 0, mix_data);
|
||||
AXSetVoiceDeviceMix(voices[i], AX_DEVICE_TYPE_TV, 0, mix_data);
|
||||
|
@ -243,11 +242,13 @@ bool AudioBackend_Init(void)
|
|||
|
||||
void AudioBackend_Deinit(void)
|
||||
{
|
||||
for (unsigned int i = 0; i < 2; ++i)
|
||||
{
|
||||
AXFreeVoice(voices[i]);
|
||||
free(stream_buffers[i]);
|
||||
}
|
||||
AXRegisterAppFrameCallback(NULL);
|
||||
|
||||
AXFreeVoice(voices[1]);
|
||||
AXFreeVoice(voices[0]);
|
||||
|
||||
free(stream_buffers[1]);
|
||||
free(stream_buffers[0]);
|
||||
|
||||
free(stream_buffer_long);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue