mixLoadAudioWithProperties function mixer
Load audio for playback through a collection of properties.
Please see MIX_LoadAudio_IO() for a description of what the various LoadAudio functions do. This function uses properties to dictate how it operates, and exposes functionality the other functions don't provide.
These are the supported properties:
MIX_PROP_AUDIO_LOAD_IOSTREAM_POINTER: a pointer to an SDL_IOStream to be used to load audio data. Required. This stream must be able to seek!MIX_PROP_AUDIO_LOAD_CLOSEIO_BOOLEAN: true if SDL_mixer should close the SDL_IOStream before returning (success or failure).MIX_PROP_AUDIO_LOAD_PREDECODE_BOOLEAN: true if SDL_mixer should fully decode and decompress the data before returning. Otherwise it will be stored in its original state and decompressed on demand.MIX_PROP_AUDIO_LOAD_PREFERRED_MIXER_POINTER: a pointer to a MIX_Mixer, in case steps can be made to match its format when decoding. Optional.MIX_PROP_AUDIO_LOAD_SKIP_METADATA_TAGS_BOOLEAN: true to skip parsing metadata tags, like ID3 and APE tags. This can be used to speed up loading if the data definitely doesn't have these tags. Some decoders will fail if these tags are present when this property is true.MIX_PROP_AUDIO_DECODER_STRING: the name of the decoder to use for this data. Optional. If not specified, SDL_mixer will examine the data and choose the best decoder. These names are the same returned from MIX_GetAudioDecoder().
Specific decoders might accept additional custom properties, such as where to find soundfonts for MIDI playback, etc.
\param props a set of properties on how to load audio. \returns an audio object that can be used to make sound on a mixer, or NULL on failure; call SDL_GetError() for more information.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL_mixer 3.0.0.
\sa MIX_DestroyAudio \sa MIX_SetTrackAudio \sa MIX_LoadAudio \sa MIX_LoadAudio_IO
extern SDL_DECLSPEC MIX_Audio * SDLCALL MIX_LoadAudioWithProperties(SDL_PropertiesID props)
Implementation
Pointer<MixAudio> mixLoadAudioWithProperties(int props) {
final mixLoadAudioWithPropertiesLookupFunction = _libMixer
.lookupFunction<
Pointer<MixAudio> Function(Uint32 props),
Pointer<MixAudio> Function(int props)
>('MIX_LoadAudioWithProperties');
return mixLoadAudioWithPropertiesLookupFunction(props);
}