---
name: "SDL_CreateAudioStream"
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_CreateAudioStream"
---

# SDL\_CreateAudioStream(3)

Create a new audio stream.

## NAME

SDL\_CreateAudioStream - Create a new audio stream.

## HEADER FILE

Defined in SDL3/SDL\_audio.h

## SYNOPSIS

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

**SDL\_AudioStream \* SDL\_CreateAudioStream(const SDL\_AudioSpec \*src\_spec, const SDL\_AudioSpec \*dst\_spec);**

## FUNCTION PARAMETERS

- *src\_spec*

  the format details of the input audio.

- *dst\_spec*

  the format details of the output audio.

## RETURN VALUE

( **SDL\_AudioStream**\
  \*) Returns a new audio stream on success or NULL on failure; call  **SDL\_GetError** () for more information.

## 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\_PutAudioStreamData**(3)](/SDL_PutAudioStreamData/3.md), **•**(3), [**SDL\_GetAudioStreamData**(3)](/SDL_GetAudioStreamData/3.md), **•**(3), [**SDL\_GetAudioStreamAvailable**(3)](/SDL_GetAudioStreamAvailable/3.md), **•**(3), [**SDL\_FlushAudioStream**(3)](/SDL_FlushAudioStream/3.md), **•**(3), [**SDL\_ClearAudioStream**(3)](/SDL_ClearAudioStream/3.md), **•**(3), [**SDL\_SetAudioStreamFormat**(3)](/SDL_SetAudioStreamFormat/3.md), **•**(3), [**SDL\_DestroyAudioStream**(3)](/SDL_DestroyAudioStream/3.md)
