sdlGetAudioDeviceChannelMap function

Pointer<Int32> sdlGetAudioDeviceChannelMap(
  1. int devid,
  2. Pointer<Int32> count
)

Get the current channel map of an audio device.

Channel maps are optional; most things do not need them, instead passing data in the order that SDL expects.

Audio devices usually have no remapping applied. This is represented by returning NULL, and does not signify an error.

\param devid the instance ID of the device to query. \param count On output, set to number of channels in the map. Can be NULL. \returns an array of the current channel mapping, with as many elements as the current output spec's channels, or NULL if default. This should be freed with SDL_free() when it is no longer needed.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

\sa SDL_SetAudioStreamInputChannelMap

extern SDL_DECLSPEC int * SDLCALL SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int *count)

Implementation

Pointer<Int32> sdlGetAudioDeviceChannelMap(int devid, Pointer<Int32> count) {
  final sdlGetAudioDeviceChannelMapLookupFunction = libSdl3.lookupFunction<
      Pointer<Int32> Function(Uint32 devid, Pointer<Int32> count),
      Pointer<Int32> Function(
          int devid, Pointer<Int32> count)>('SDL_GetAudioDeviceChannelMap');
  return sdlGetAudioDeviceChannelMapLookupFunction(devid, count);
}