---
name: "roar_stream_add_data"
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_add_data"
---

# roar\_stream\_add\_data(3)

Adds data to a stream's input buffer using the control connection

## NAME

roar\_stream\_add\_data - Adds data to a stream's input buffer using the control connection

## SYNOPSIS

\#include \<roaraudio.h\>

int roar\_stream\_add\_data(struct roar\_connection \* con, struct roar\_stream \* s, char \* data, size\_t len);

## DESCRIPTION

This adds data to the input buffer of a stream. It's like doing some thing like this:

 write(stream\_fh, data, len);

but uses the control channel to add the data.

## PARAMETERS

- **con**

  The connection to the server.

- **s**

  The stream to add data to it's input buffer.

- **data**

  The data to add to the buffer.

- **len**

  The length of the data to be added.

## RETURN VALUE

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

## EXAMPLES

FIXME

## BUGS

This call doesn't work with the current roard. The server does not use all of the buffer size and complains about unterruns.

## SEE ALSO

[**write**(2)](/write/2.md), [**libroar**(7)](/libroar/7.md), [**RoarAudio**(7)](/RoarAudio/7.md).
