SDL_GetAudioStreamDevice(3)

SDL_GetAudioStreamDevice3

Query an audio stream for its currently-bound device.

Usage

#include "SDL3/SDL.h"

SDL_AudioDeviceID SDL_GetAudioStreamDevice(SDL_AudioStream *stream);

Header file

Defined in SDL3/SDL_audio.h

Overview

This reports the audio device that an audio stream is currently bound to.

If not bound, or invalid, this returns zero, which is not a valid device ID.

Function parameters

stream

the audio stream to query.

Return value

( SDL_AudioDeviceID ) Returns the bound audio device, or 0 if not bound or invalid.

Thread safety

It is safe to call this function from any thread.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.