---
name: "roar_simple_stream"
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_stream"
---

# roar\_simple\_stream(3)

Opens a stream to RoarAudio's sound server

## NAME

roar\_simple\_stream - Opens a stream to RoarAudio's sound server

## SYNOPSIS

\#include \<roaraudio.h\>

int roar\_simple\_stream(int rate, int channels, int bits, int codec, char \* server, int dir, char \* name);

## DESCRIPTION

This creates a new stream to RoarAudio. Normally you want to use one of [**roar\_simple\_play**(3)](/roar_simple_play/3.md), [**roar\_simple\_monitor**(3)](/roar_simple_monitor/3.md), [**roar\_simple\_record**(3)](/roar_simple_record/3.md) or [**roar\_simple\_filter**(3)](/roar_simple_filter/3.md).

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

## PARAMETERS

- **rate, channels, bits, codec, server, name**

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

- **dir**

  The direction of the new stream. See below for a list of valid directions.

## STREAM DIRECTIONS

- **ROAR\_DIR\_PLAY**

  This stream directions means that a player streams data to the server in order to play it back.

- **ROAR\_DIR\_RECORD**

  This direction is to record audio from the soundcard. This is used if for example you want to get data from your microphon or line in.

- **ROAR\_DIR\_MONITOR**

  This direction is used to get a copy of what the server sends to the soundcard. This can for example be used to stream the fully mixed data to Icecast (see [**icecast2**(1)](/icecast2/1.md)).

- **ROAR\_DIR\_FILTER**

  This is used to crate a filter stream: A filter stream is a stream used to filter the output of the sound server by some tool. This can for example be used for an software equalizer. The filter stream is the only bi-directional stream. You have to read some data and write back data of exactly the same size.

- **ROAR\_DIR\_OUTPUT**

  This is the type of the stream the server sends to the soundcard. You can not create such a stream. It's only listend for completeness.

## RETURN VALUE

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

## EXAMPLES

FIXME

## SEE ALSO

[**roar\_vs\_new\_simple**(3)](/roar_vs_new_simple/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).
