muroar_setvolume - Set volume of a stream on a RoarAudio sound server
Contents
Bugs
In failure where is no way to tell was was going wrong. In case of failture the control connection needs
to be closed with muroar_close(3).
Description
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.
History
This function first appeared in muRoar version 0.1.8.
Name
muroar_setvolume - Set volume of a stream on a RoarAudio sound server
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.
See Also
muroar_connect(3), muroar_close(3), RoarAudio(7). muRoar April 2012 muroar_setvolume(3)
Synopsis
#include <muroar.h>
int muroar_setvolume (muroar_t fh, int stream, long unsigned int left, long unsigned int right);
