This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

SDL_GetAudioDeviceSpec

Get the preferred audio format of a specific audio device.

Syntax

int SDL_GetAudioDeviceSpec(int index,
                           int iscapture,
                           SDL_AudioSpec *spec);

Function Parameters

index

the index of the audio device; valid values range from 0 to SDL_GetNumAudioDevices() - 1

iscapture

non-zero to query the list of recording devices, zero to query the list of output devices.

spec

The SDL_AudioSpec to be initialized by this function.

Return Value

Returns 0 on success, nonzero on error

Remarks

This function is only valid after a successfully initializing the audio subsystem. The values returned by this function reflect the latest call to SDL_GetNumAudioDevices(); re-call that function to redetect available hardware.

spec will be filled with the sample rate, sample format, and channel count. All other values in the structure are filled with 0. When the supported struct members are 0, SDL was unable to get the property from the backend.

SDL_GetNumAudioDevices

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

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