table of contents
- experimental 3.1~git20250910~d032535+ds-1
MIX_CreateAudioDecoder(3) | SDL_mixer3 FUNCTIONS | MIX_CreateAudioDecoder(3) |
NAME¶
MIX_CreateAudioDecoder - Create a MIX_AudioDecoder
from a path on the filesystem.
HEADER FILE¶
Defined in SDL3_mixer/SDL_mixer.h
SYNOPSIS¶
#include "SDL3_mixer/SDL_mixer.h"
MIX_AudioDecoder * MIX_CreateAudioDecoder(const char *path, SDL_PropertiesID props);
DESCRIPTION¶
Most apps won't need this, as SDL_mixer's usual interfaces will decode audio as needed. However, if one wants to decode an audio file into a memory buffer without playing it, this interface offers that.
This function allows properties to be specified. This is intended to supply file-specific settings, such as where to find SoundFonts for a MIDI file, etc. In most cases, the caller should pass a zero to specify no extra properties.
When done with the audio decoder, it can be destroyed with
MIX_DestroyAudioDecoder ().
This function requires SDL_mixer to have been initialized with a successful call to MIX_Init (), but does not need an actual
MIX_Mixer
to have been created.
FUNCTION PARAMETERS¶
RETURN VALUE¶
( MIX_AudioDecoder
*) Returns an audio decoder, ready to decode.
THREAD SAFETY¶
It is safe to call this function from any thread.
AVAILABILITY¶
This function is available since SDL_mixer 3.0.0.
SEE ALSO¶
•(3), MIX_CreateAudioDecoder_IO(3), •(3), MIX_DecodeAudio(3), •(3), MIX_DestroyAudioDecoder(3)
SDL_mixer 3.1.0 | SDL_mixer |