---
name: "SDL_GetAudioStreamDevice"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetAudioStreamDevice"
---

# SDL\_GetAudioStreamDevice(3)

Query an audio stream for its currently-bound device.

## NAME

SDL\_GetAudioStreamDevice - Query an audio stream for its currently-bound device.

## HEADER FILE

Defined in SDL3/SDL\_audio.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_AudioDeviceID SDL\_GetAudioStreamDevice(SDL\_AudioStream \*stream);**

## DESCRIPTION

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.

## SEE ALSO

**•**(3), [**SDL\_BindAudioStream**(3)](/SDL_BindAudioStream/3.md), **•**(3), [**SDL\_BindAudioStreams**(3)](/SDL_BindAudioStreams/3.md)
