SDL_FlushAudioStream(3)

πŸ’– NAME πŸ’–

okay bestie, welcome to SDL_FlushAudioStream(3) πŸ’… this one is all about telling the stream that you're done sending data, and anything being buffered should be converted/resampled and made available immediately. no cap. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_audio.h>

bool SDL_FlushAudioStream(SDL_AudioStream *stream);

🌸 DESCRIPTION 🌸

so like, it is legal to add more data to a stream after flushing, but heads up bestie: there may be audio gaps in the output. 😭 generally this is intended to signal the end of input, so the complete output becomes available. it's giving "finish line" energy. 🏁


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • stream β€” the audio stream to flush. yes bestie, that's the one. 🫢

✨ 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. periodt. πŸ’…


πŸ‘‘ AVAILABILITY πŸ‘‘

this function is available since SDL 3.2.0. iconic. ⭐


🌈 SEE ALSO 🌈


xoxo, this page came from Simple Directmedia Layer, version SDL 3.4.18, and the manual tag is SDL_FlushAudioStream(3). no date in the footer, just version energy and main character vibes. πŸ’…πŸŽ€

πŸ“¦ where this page comes from