---
name: "roar_stream_new"
section: "3"
platform: "linux"
package: "libroar-dev"
version: "1.0~beta12-4"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/roar_stream_new"
---

# roar\_stream\_new(3)

creates a new stream object

## NAME

roar\_stream\_new - creates a new stream object

## SYNOPSIS

\#include \<roaraudio.h\>

int roar\_stream\_new(struct roar\_stream \* s, unsigned int rate, unsigned int channels, unsigned int bits, unsigned int codec);

## DESCRIPTION

This call create a new stream object.

## PARAMETERS

The parameter **s** is a pointer to the new stream object.

For a description of the other parameters see [**roar\_simple\_play**(3)](/roar_simple_play/3.md).

## RETURN VALUE

On success these calls return 0.  On error, -1 is returned.

## EXAMPLES

FIXME

## SEE ALSO

[**roar\_simple\_play**(3)](/roar_simple_play/3.md), [**libroar**(7)](/libroar/7.md), [**RoarAudio**(7)](/RoarAudio/7.md).
