SDL School

API reference / Audio

SDL_DestroyAudioStream

Function, SDL3

Frees a stream. For a stream from SDL_OpenAudioDeviceStream, this also closes its device.

Declaration

#include <SDL3/SDL.h>

void SDL_DestroyAudioStream(SDL_AudioStream *stream);

Parameters

streamThe stream. NULL is safe.

Example

Play a sound
SDL_DestroyAudioStream(stream);

See this code run in Play a sound. Download the full program (.zip)

In SDL2

Use SDL_CloseAudioDevice.

See also