Function sdl2_sys::SDL_GetAudioDeviceSpec
source ยท pub unsafe extern "C" fn SDL_GetAudioDeviceSpec(
index: c_int,
iscapture: c_int,
spec: *mut SDL_AudioSpec,
) -> c_int
Expand description
Get the preferred audio format of a specific audio device.
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.
\param index the index of the audio device; valid values range from 0 to SDL_GetNumAudioDevices() - 1 \param iscapture non-zero to query the list of recording devices, zero to query the list of output devices. \param spec The SDL_AudioSpec to be initialized by this function. \returns 0 on success, nonzero on error
\since This function is available since SDL 2.0.16.
\sa SDL_GetNumAudioDevices \sa SDL_GetDefaultAudioInfo