SDL Wiki
[ front page | index | search | recent changes | git repo | offline html ]
(This function is part of SDL_mixer, a separate library from SDL.)

MIX_GetAudioDecoderFormat

Query the initial audio format of a MIX_AudioDecoder.

Header File

Defined in <SDL3_mixer/SDL_mixer.h>

Syntax

bool MIX_GetAudioDecoderFormat(MIX_AudioDecoder *audiodecoder, SDL_AudioSpec *spec);

Function Parameters

MIX_AudioDecoder * audiodecoder the audio decoder to query.
SDL_AudioSpec * spec on success, audio format details will be stored here.

Return Value

(bool) Returns true on success or false on failure; call SDL_GetError() for more information.

Remarks

Note that some audio files can change format in the middle; some explicitly support this, but a more common example is two MP3 files concatenated together. In many cases, SDL_mixer will correctly handle these sort of files, but this function will only report the initial format a file uses.

Thread Safety

It is safe to call this function from any thread.

Version

This function is available since SDL_mixer 3.0.0.


CategoryAPI, CategoryAPIFunction, CategorySDLMixer


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.