Skip to content

Instantly share code, notes, and snippets.

@ashquarky
Created September 20, 2019 11:08
Show Gist options
  • Save ashquarky/e699fb512d6d760455983ba238a178ff to your computer and use it in GitHub Desktop.
Save ashquarky/e699fb512d6d760455983ba238a178ff to your computer and use it in GitHub Desktop.
diff --git src/audio/wiiu/SDL_wiiuaudio.c src/audio/wiiu/SDL_wiiuaudio.c
index 8004ff99d..fa01d2020 100644
--- src/audio/wiiu/SDL_wiiuaudio.c
+++ src/audio/wiiu/SDL_wiiuaudio.c
@@ -66,15 +66,43 @@ static int WIIUAUDIO_OpenDevice(_THIS, void* handle, const char* devname, int is
AXVoiceVeData vol = {
.volume = 0x8000,
};
- AXVoiceDeviceMixData drcmix = {
- .bus = {
- { .volume = 0x8000 }, //bus 0
- { .volume = 0x0000 }, //bus 1
- { .volume = 0x0000 }, //bus 2
- { .volume = 0x0000 }, //bus 3
+ //TODO: AXGetDeviceChannelCount
+ AXVoiceDeviceMixData drcmix[] = {
+ [0] = {
+ .bus = {
+ { .volume = 0x8000 }, //bus 0
+ { .volume = 0x0000 }, //bus 1
+ { .volume = 0x0000 }, //bus 2
+ { .volume = 0x0000 }, //bus 3
+ }
+ },
+ [1] = {
+ .bus = {
+ { .volume = 0x0000 }, //bus 0
+ { .volume = 0x0000 }, //bus 1
+ { .volume = 0x0000 }, //bus 2
+ { .volume = 0x0000 }, //bus 3
+ }
+ },
+ };
+ AXVoiceDeviceMixData tvmix[] = {
+ [0] = {
+ .bus = {
+ { .volume = 0x0200 }, //bus 0
+ { .volume = 0x0000 }, //bus 1
+ { .volume = 0x0000 }, //bus 2
+ { .volume = 0x0000 }, //bus 3
+ }
+ },
+ [1] = {
+ .bus = {
+ { .volume = 0x8000 }, //bus 0
+ { .volume = 0x0000 }, //bus 1
+ { .volume = 0x0000 }, //bus 2
+ { .volume = 0x0000 }, //bus 3
+ }
},
};
- AXVoiceDeviceMixData tvmix = drcmix;
uint32_t old_affinity;
float srcratio;
@@ -114,8 +142,8 @@ static int WIIUAUDIO_OpenDevice(_THIS, void* handle, const char* devname, int is
/* Set the voice's volume */
AXSetVoiceVe(this->hidden->voice, &vol);
- AXSetVoiceDeviceMix(this->hidden->voice, AX_DEVICE_TYPE_DRC, 0, &drcmix);
- AXSetVoiceDeviceMix(this->hidden->voice, AX_DEVICE_TYPE_TV, 0, &tvmix);
+ AXSetVoiceDeviceMix(this->hidden->voice, AX_DEVICE_TYPE_DRC, 0, drcmix);
+ AXSetVoiceDeviceMix(this->hidden->voice, AX_DEVICE_TYPE_TV, 0, tvmix);
/* Set the samplerate conversion ratio
<source sample rate> / <target sample rate> */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment