File: muroar_stream.3

package info (click to toggle)
muroar 0.1.13-7
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 320 kB
  • sloc: ansic: 887; sh: 236; makefile: 107
file content (79 lines) | stat: -rw-r--r-- 2,257 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.\" muroar_beep.3

.TH "muroar_stream" "3" "April 2012" "muRoar" "muRoar Programmer's Manual"

.SH NAME
muroar_stream \- Create a stream connected to a RoarAudio sound server

.SH SYNOPSIS

#include <muroar.h>

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

.SH "DESCRIPTION"

This function connects a stream to a sound server supporting the RoarAudio protocol.
It takes a connected control connection created with \fBroar_connect\fR(3) and
converts it into a connected stream. The socket can no longer be used as control connection.

.SH "PARAMETERS"
.TP
\fBfh\fR
The connected control connection.

.TP
\fBdir\fR
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 official muRoar manual.

.TP
\fBstream\fR
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.

.TP
\fBcodec\fR
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 official muRoar manual.

.TP
\fBrate\fR
This is the sample/frame rate the new stream will use.
For streams this setting does not make any sense set this to zero.

.TP
\fBchannels\fR
This is the number of channels for the new stream.
For streams this setting does not make any sense set this to zero.

.TP
\fBbits\fR
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.


.SH "RETURN VALUE"
On success this call return the new stream IO handle.
This may be the same as the control connection or a new one and the control
connection is closed. On error, MUROAR_HANDLE_INVALID is returned.

.SH BUGS
In failure where is no way to tell was was going wrong.

.SH HISTORY

This function first appeared in muRoar version 0.1beta0.

.SH "SEE ALSO"
\fBmuroar_connect\fR(3),
\fBmuroar_close\fR(3),
\fBRoarAudio\fR(7).

.\" ll