Function SDL_FlushAudioStream

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

Tell the stream that you’re done sending data, and anything being buffered should be converted/resampled and made available immediately.

It is legal to add more data to a stream after flushing, but there may be audio gaps in the output. Generally this is intended to signal the end of input, so the complete output becomes available.

§Parameters

  • stream: the audio stream to flush.

§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.

§Availability

This function is available since SDL 3.2.0.

§See also