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

# roar\_simple\_new\_stream\_obj(3)

Create a new stream via RoarAudio

## NAME

roar\_simple\_new\_stream, roar\_simple\_new\_stream\_obj - Create a new stream via RoarAudio

## SYNOPSIS

\#include \<roaraudio.h\>

int roar\_simple\_new\_stream(struct roar\_connection \* con, int rate, int channels, int bits, int codec, int dir);

int roar\_simple\_new\_stream\_obj(struct roar\_connection \* con, struct roar\_stream \* s, int rate, int channels, int bits, int codec, int dir);

## DESCRIPTION

Opens a new stream to the sound server as a independet file handle (not an execed one). This is useful if you still want some meta data or the volume to be updated after the stream is open.

This functions are marked obsolete and will be removed in later releases. Please upgrade to VS API. See [**roar\_vs\_new\_simple**(3)](/roar_vs_new_simple/3.md).

## PARAMETERS

- **con**

  The "parent" connection. This is a valid open control connection as opend via [**roar\_simple\_connect**(3)](/roar_simple_connect/3.md).

- **s**

  The stream object to be updated to corresponde to the new stream. This is useful if use want to update some meta data after the stream has be opened as you can use all control commands on this object.

- **rate, channels, bits, codec**

  For an explanation on these parameters see [**roar\_simple\_play**(3)](/roar_simple_play/3.md).

- **dir**

  For an explanation on this parameter see [**roar\_simple\_stream**(3)](/roar_simple_stream/3.md).

## RETURN VALUE

On success these calls return a new filehandle.  On error, -1 is returned.

## EXAMPLES

An example of the use of **roar\_simple\_new\_stream\_obj()** can be found on [**roarvorbis**(1)](/roarvorbis/1.md) code.

## SEE ALSO

[**roar\_vs\_new\_simple**(3)](/roar_vs_new_simple/3.md), [**roar\_simple\_connect**(3)](/roar_simple_connect/3.md), [**roar\_simple\_play**(3)](/roar_simple_play/3.md), [**roar\_simple\_close**(3)](/roar_simple_close/3.md), [**libroar**(7)](/libroar/7.md), [**RoarAudio**(7)](/RoarAudio/7.md).
