mixQuickLoadRaw function

Pointer<MixChunk> mixQuickLoadRaw(
  1. Pointer<Uint8> mem,
  2. int len
)

Load a raw audio data from memory as quickly as possible.

The audio data MUST be in the exact same format as the audio device. This function will not attempt to convert it, or even verify it's in the right format.

If this function is successful, the provided memory buffer must remain available until Mix_FreeChunk() is called on the returned chunk.

\param mem memory buffer containing raw PCM data. \param len length of buffer pointed to by mem, in bytes. \returns a new chunk, or NULL on error.

\since This function is available since SDL_mixer 3.0.0.

\sa Mix_FreeChunk

extern SDL_DECLSPEC Mix_Chunk * SDLCALL Mix_QuickLoad_RAW(Uint8 *mem, Uint32 len)

Implementation

Pointer<MixChunk> mixQuickLoadRaw(Pointer<Uint8> mem, int len) {
  final mixQuickLoadRawLookupFunction = libSdl3Mixer.lookupFunction<
      Pointer<MixChunk> Function(Pointer<Uint8> mem, Uint32 len),
      Pointer<MixChunk> Function(
          Pointer<Uint8> mem, int len)>('Mix_QuickLoad_RAW');
  return mixQuickLoadRawLookupFunction(mem, len);
}