Man Linux: Main Page and Category List

NAME

       muroar_stream - Create a stream connected to a RoarAudio sound server

SYNOPSIS

       #include <muroar.h>

       int  muroar_stream (int fh, int dir, int * stream, int codec, int rate,
       int channels, int bits);

DESCRIPTION

       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.

PARAMETERS

       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.

       channels
              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
              zero.

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.

HISTORY

       This function first appeared in muRoar version 0.1beta0.

SEE ALSO

       muroar_connect(3), muroar_close(3), RoarAudio(7).