You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently channel maps require every channel of the output map is bound to a valid input channel. There is currently no way to map an output channel to null (not play anything on a channel).
For example, if the input is a stereo stream (2 channels) and the output is a quadrophonic stream (4 channels), it is currently impossible to play the stereo sound on only the first two channels of the quadrophonic stream, you would need to duplicate the stereo sound to channels 3 and 4, which may be undesired.
Example use cases
Use case 1
Take for example you have a quadrophonic output.
Channel 1 is front left
Channel 2 is front right
Channel 3 is back left
Channel 4 is back right
You have two input streams
you want to map input stream 1 to play on the front channels
you want to map input stream 2 to play on the back channels
This behaviour is currently unsupported by SDL, as when you create a channel map for stream 1, each output channel must be bound to an input channel.
Use case 2
This is a lot more specific to my use case.
A DualSense controller exposes a 4-channel audio playback device,
channels 1 and 2 are used for a regular stereo passthrough to a wired jack on the controller.
channels 3 and 4 are used for HD haptics: 3 being for the left handle, 4 being for the right
In this scenario, my game has two audio streams: one for game audio, the other for HD haptic data.
It would be ideal to be able to map my two streams as { 0, 1, null, null } and { null, null, 0, 1 } respectively. Instead however, I need to mix these two audio streams by adding 0 samples to the channels I don't want to play on.
Solution
Allow channel maps to accept -1, indicating a channel is mapped to nothing.
You could #define NO_MAP -1 to make the DX a little better too.
The text was updated successfully, but these errors were encountered:
Problem
Currently channel maps require every channel of the output map is bound to a valid input channel. There is currently no way to map an output channel to null (not play anything on a channel).
For example, if the input is a stereo stream (2 channels) and the output is a quadrophonic stream (4 channels), it is currently impossible to play the stereo sound on only the first two channels of the quadrophonic stream, you would need to duplicate the stereo sound to channels 3 and 4, which may be undesired.
Example use cases
Use case 1
Take for example you have a quadrophonic output.
You have two input streams
This behaviour is currently unsupported by SDL, as when you create a channel map for stream 1, each output channel must be bound to an input channel.
Use case 2
This is a lot more specific to my use case.
A DualSense controller exposes a 4-channel audio playback device,
In this scenario, my game has two audio streams: one for game audio, the other for HD haptic data.
It would be ideal to be able to map my two streams as
{ 0, 1, null, null }
and{ null, null, 0, 1 }
respectively. Instead however, I need to mix these two audio streams by adding 0 samples to the channels I don't want to play on.Solution
Allow channel maps to accept
-1
, indicating a channel is mapped to nothing.You could
#define NO_MAP -1
to make the DX a little better too.The text was updated successfully, but these errors were encountered: