API reference / Audio
SDL_ClearAudioStream
Function, SDL3
Removes all the samples that wait in a stream. Use it to stop a sound at once.
Declaration
#include <SDL3/SDL.h>
bool SDL_ClearAudioStream(SDL_AudioStream *stream);Parameters
stream | The stream. |
Return value
True on success. On failure it returns false.
Example
SDL_ClearAudioStream(stream);See this code run in Play a sound. Download the full program (.zip)
In SDL2
Use SDL_ClearQueuedAudio.