muroar_setvolume3
Set volume of a stream on a roaraudio sound server
Usage
#include <muroar.h>
int muroar_setvolume (muroar_t fh, int stream, long unsigned int left, long unsigned int right);
Overview
This function sets the volume of a stream on a sound server supporting the RoarAudio protocol. It takes a connected control connection created with roar_connect(3) and used it to comunicate with the already connected server. In addition it takes the stream ID and the volume for the left and right channel.
This function supports both mono and stereo streams. It also supports setting volume to multi-channel streams if the server supports UNMAPPED mode.
To set a volume in mono just provide the same volume for both (left and right channel) channels.
Parameters
fh-
The connected control connection.
stream-
This is the ID of the stream to set the volume for.
left,right-
This is the volume of the corresponding channel. The value is a 16 bit unsigned number so it has the range from 0 (truly muted, -InfdB) to 65535 (full volume, 0dB).
Return value
On success this call return 0. On error, -1 is returned.