table of contents
muroar_setvolume(3) | muRoar Programmer's Manual | muroar_setvolume(3) |
NAME¶
muroar_setvolume - Set volume of a stream on a RoarAudio sound server
SYNOPSIS¶
#include <muroar.h>
int muroar_setvolume (muroar_t fh, int stream, long unsigned int left, long unsigned int right);
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.
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.
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).
HISTORY¶
This function first appeared in muRoar version 0.1.8.
SEE ALSO¶
muroar_connect(3), muroar_close(3), RoarAudio(7).
April 2012 | muRoar |