Scroll to navigation

Mix_QuerySpec(3) SDL_mixer3 FUNCTIONS Mix_QuerySpec(3)

NAME

Mix_QuerySpec - Find out what the actual audio device parameters are.

SYNOPSIS

#include "SDL3_mixer/SDL_mixer.h"
int Mix_QuerySpec(int *frequency, Uint16 *format, int *channels);

DESCRIPTION

Note this is only important if the app intends to touch the audio buffers being sent to the hardware directly. If an app just wants to play audio files and let SDL_mixer handle the low-level details, this function can probably be ignored.

If the audio device is not opened, this function will return 0.

FUNCTION PARAMETERS

On return, will be filled with the audio device's frequency in Hz.
On return, will be filled with the audio device's format.
On return, will be filled with the audio device's channel count.

RETURN VALUE

Returns 1 if the audio device has been opened, 0 otherwise.

AVAILABILITY

This function is available since SDL_mixer 3.0.0.

SEE ALSO

Mix_OpenAudio(3)

SDL_mixer 3.0.0 SDL_mixer