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

# roar\_set\_vol(3)

Set mixer levels or RoarAudio streams

## NAME

roar\_get\_vol, roar\_set\_vol, roar\_set\_vol2 - Set mixer levels or RoarAudio streams

## SYNOPSIS

\#include \<roaraudio.h\>

int roar\_set\_vol(struct roar\_connection \* con, int id, struct roar\_mixer\_settings \* mixer, int   channels);

int roar\_set\_vol2     (struct roar\_connection \* con, int id, struct roar\_mixer\_settings \* mixer, int   channels, int mode);

int roar\_get\_vol(struct roar\_connection \* con, int id, struct roar\_mixer\_settings \* mixer, int \* channels);

## DESCRIPTION

This call gets or sets the mixing levels for a stream.

roar\_set\_vol() is marked obsolete and will be removed soon, use roar\_set\_vol2().

## PARAMETERS

- **con**

  The connection to the roar audio server.

- **id**

  The ID of the stream to change.

- **mixer**

  The mixer state for the stream.

- **channels**

  The number of channels to set mixer data for or the number of channels mixer data is returned.

- **mode**

  The mode of operating. Currently the following modes are supported: ROAR\_SET\_VOL\_ALL, ROAR\_SET\_VOL\_MS, ROAR\_SET\_VOL\_UNMAPPED.

## RETURN VALUE

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

## EXAMPLES

FIXME

## SEE ALSO

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