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

# roar\_vs\_write(3)

Read or write data from or to sound server

## NAME

roar\_vs\_read, roar\_vs\_write - Read or write data from or to sound server

## SYNOPSIS

\#include \<roaraudio.h\>

ssize\_t roar\_vs\_read (roar\_vs\_t \* vss,       void \* buf, size\_t len, int \* error);

ssize\_t roar\_vs\_write(roar\_vs\_t \* vss, const void \* buf, size\_t len, int \* error);

## DESCRIPTION

roar\_vs\_read() reads data from the sound server into buffer **buf**.

roar\_vs\_write() writes data in buffer **buf** to the sound server.

## PARAMETERS

- **vss**

  The VS object data is read from or written to.

- **buf**

  The buffer to read to or write from.

- **len**

  The length of the data to be read or written in byte.

- **error**

  This is a pointer to a integer used to store the error value in case of error. This can be NULL if not used but it is very recommended to use this error value to report good error messages to the user.

## RETURN VALUE

On success these calls return the amount of data read or written. This can be smaller than the requested size.  On error, -1 is returned.

## EXAMPLES

FIXME

## SEE ALSO

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