// Based off the speaker configurations mentioned here: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ksmedia/ns-ksmedia-ksaudio_channel_config
switch(channels)
{
case1:
{
channelMap[0]=MAL_CHANNEL_MONO;
}break;
case2:
{
channelMap[0]=MAL_CHANNEL_FRONT_LEFT;
channelMap[1]=MAL_CHANNEL_FRONT_RIGHT;
}break;
case3:// Not defined, but best guess.
{
channelMap[0]=MAL_CHANNEL_FRONT_LEFT;
channelMap[1]=MAL_CHANNEL_FRONT_RIGHT;
channelMap[2]=MAL_CHANNEL_FRONT_CENTER;
}break;
case4:
{
#ifndef MAL_USE_QUAD_MICROSOFT_CHANNEL_MAP
// Surround. Using the Surround profile has the advantage of the 3rd channel (MAL_CHANNEL_FRONT_CENTER) mapping nicely
@@ -14781,7 +15166,7 @@ mal_result mal_decoder_init_wav__internal(const mal_decoder_config* pConfig, mal
...
@@ -14781,7 +15166,7 @@ mal_result mal_decoder_init_wav__internal(const mal_decoder_config* pConfig, mal
pDecoder->internalChannels=pWav->channels;
pDecoder->internalChannels=pWav->channels;
pDecoder->internalSampleRate=pWav->sampleRate;
pDecoder->internalSampleRate=pWav->sampleRate;
mal_get_default_device_config_channel_map(pDecoder->internalChannels,pDecoder->internalChannelMap);// For WAV files we are currently making an assumption on the channel map.