Function SDL_GetAudioStreamFormat

pub unsafe extern "C" fn SDL_GetAudioStreamFormat(
    stream: *mut SDL_AudioStream,
    src_spec: *mut SDL_AudioSpec,
    dst_spec: *mut SDL_AudioSpec,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Query the current format of an audio stream.

§Parameters

  • stream: the SDL_AudioStream to query.
  • src_spec: where to store the input audio format; ignored if NULL.
  • dst_spec: where to store the output audio format; ignored if NULL.

§Return value

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

§Thread safety

It is safe to call this function from any thread, as it holds a stream-specific mutex while running.

§Availability

This function is available since SDL 3.2.0.

§See also