mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-18 15:17:13 +00:00
testsurround: fix channel names
Used table in include/SDL3/SDL_audio.h as reference. (cherry picked from commit e1b8a032391f4b24453d5bcbe725a35b3894ea5d)
This commit is contained in:
parent
16c9bad786
commit
03c239ded9
|
@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
||||||
* The calculated values in this structure are calculated by SDL_OpenAudio().
|
* The calculated values in this structure are calculated by SDL_OpenAudio().
|
||||||
*
|
*
|
||||||
* For multi-channel audio, the default SDL channel mapping is:
|
* For multi-channel audio, the default SDL channel mapping is:
|
||||||
* 2: FL FR (stereo)
|
* 2: FL FR (stereo)
|
||||||
* 3: FL FR LFE (2.1 surround)
|
* 3: FL FR LFE (2.1 surround)
|
||||||
* 4: FL FR BL BR (quad)
|
* 4: FL FR BL BR (quad)
|
||||||
* 5: FL FR LFE BL BR (4.1 surround)
|
* 5: FL FR LFE BL BR (4.1 surround)
|
||||||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
|
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
|
||||||
* 7: FL FR FC LFE BC SL SR (6.1 surround)
|
* 7: FL FR FC LFE BC SL SR (6.1 surround)
|
||||||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
|
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
|
||||||
*/
|
*/
|
||||||
typedef struct SDL_AudioSpec
|
typedef struct SDL_AudioSpec
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,6 +38,7 @@ get_channel_name(int channel_index, int channel_count)
|
||||||
case 2:
|
case 2:
|
||||||
switch (channel_count) {
|
switch (channel_count) {
|
||||||
case 3:
|
case 3:
|
||||||
|
case 5:
|
||||||
return "Low Frequency Effects";
|
return "Low Frequency Effects";
|
||||||
case 4:
|
case 4:
|
||||||
return "Back Left";
|
return "Back Left";
|
||||||
|
@ -57,27 +58,32 @@ get_channel_name(int channel_index, int channel_count)
|
||||||
switch (channel_count) {
|
switch (channel_count) {
|
||||||
case 5:
|
case 5:
|
||||||
return "Back Right";
|
return "Back Right";
|
||||||
|
case 6:
|
||||||
|
return "Side Left";
|
||||||
case 7:
|
case 7:
|
||||||
return "Back Center";
|
return "Back Center";
|
||||||
case 6:
|
|
||||||
case 8:
|
case 8:
|
||||||
return "Back Left";
|
return "Back Left";
|
||||||
}
|
}
|
||||||
|
SDL_assert(0);
|
||||||
case 5:
|
case 5:
|
||||||
switch (channel_count) {
|
switch (channel_count) {
|
||||||
case 7:
|
|
||||||
return "Back Left";
|
|
||||||
case 6:
|
case 6:
|
||||||
|
return "Side Right";
|
||||||
|
case 7:
|
||||||
|
return "Side Left";
|
||||||
case 8:
|
case 8:
|
||||||
return "Back Right";
|
return "Back Right";
|
||||||
}
|
}
|
||||||
|
SDL_assert(0);
|
||||||
case 6:
|
case 6:
|
||||||
switch (channel_count) {
|
switch (channel_count) {
|
||||||
case 7:
|
case 7:
|
||||||
return "Back Right";
|
return "Side Right";
|
||||||
case 8:
|
case 8:
|
||||||
return "Side Left";
|
return "Side Left";
|
||||||
}
|
}
|
||||||
|
SDL_assert(0);
|
||||||
case 7:
|
case 7:
|
||||||
return "Side Right";
|
return "Side Right";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue