audioReorderChannels

fnbool audioReorderChannels(ubyte[] data, gstaudio.types.AudioFormat format, gstaudio.types.AudioChannelPosition[] from, gstaudio.types.AudioChannelPosition[] to)

Reorders data from the channel positions from to the channel positions to. from and to must contain the same number of positions and the same positions, only in a different order.

Note

this function assumes the audio data is in interleaved layout

Parameters

dataThe pointer to the memory.
formatThe [gstaudio.types.AudioFormat] of the buffer.
fromThe channel positions in the buffer.
toThe channel positions to convert to.

Returns

true if the reordering was possible.