• Steven Noonan's avatar
    channel mapping: treat "simple" mix mode as a 1:1 mapping only mode · 5aee5d65
    Steven Noonan authored
    We already map the in:out 1:1 mappings above the switch statement, but
    the code for "simple" mapping stomps on the mappings.
    
    Also, even before that loop was added, mix mode "simple" did not
    necessarily map to the same channel types you'd expect. For example, if
    you have a 6-channel input and 8-channel output, you would get something
    like this with "simple":
    
      Correct:  CHANNEL_FRONT_LEFT -> CHANNEL_FRONT_LEFT
      Correct:  CHANNEL_FRONT_RIGHT -> CHANNEL_FRONT_RIGHT
      Correct:  CHANNEL_FRONT_CENTER -> CHANNEL_FRONT_CENTER
      Correct:  CHANNEL_LFE -> CHANNEL_LFE
      Wrong:    CHANNEL_SIDE_LEFT -> CHANNEL_BACK_LEFT
      Wrong:    CHANNEL_SIDE_RIGHT -> CHANNEL_BACK_RIGHT
    
    Instead of just assuming the input channel map is a truncation of the
    output channel map and has channels in the same order, just keep the
    existing 1:1 mappings and hope that's sufficient.
    Signed-off-by: default avatarSteven Noonan <steven@uplinklabs.net>
    5aee5d65
miniaudio.h 3.69 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.