muroar_stream - Create a stream connected to a RoarAudio sound server
int muroar_stream (int fh, int dir, int * stream, int codec, int rate,
int channels, int bits);
This function connects a stream to a sound server supporting the
RoarAudio protocol. It takes a connected control connection created
with roar_connect(3) and converts it into a connected stream. The
socket can no longer be used as control connection.
fh The connected control connection.
dir The stream direction for the new stream. For playback of a
waveform stream (PCM data) this is MUROAR_PLAY_WAVE. For all
possible values see the offical muRoar manual.
stream This is a pointer to an integer muRoar stores the stream ID in.
If your application does not need to know the stream ID of the
new stream this can be set to NULL.
codec This is the codec to be used for the new stream. For signed PCM
in host byte order use MUROAR_CODEC_PCM or MUROAR_CODEC_PCM_S.
For unsigned PCM use MUROAR_CODEC_PCM_U. There are a lot other
codecs defined. However using a codec not supported by the
server will result an failure of this call. For all possible
values see the offical muRoar manual.
rate This is the sample/frame rate the new stream will use. For
streams this setting does not make any sense set this to zero.
This is the number of channels for the new stream. For streams
this setting does not make any sense set this to zero.
bits This is the number of bits per sample to be used by the data.
For streams this setting does not make any sense set this to
On success this call return 0. On error, -1 is returned.
In failure where is no way to tell was was going wrong.
This function first appeared in muRoar version 0.1beta0.
muroar_connect(3), muroar_close(3), RoarAudio(7).