muroar_setvolume(3) | muRoar Programmer's Manual | muroar_setvolume(3) |
muroar_setvolume - Set volume of a stream on a RoarAudio sound server
#include <muroar.h>
int muroar_setvolume (muroar_t fh, int stream, long unsigned int left, long unsigned int right);
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.
On success this call return 0. On error, -1 is returned.
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).
This function first appeared in muRoar version 0.1.8.
April 2012 | muRoar |