Line | |
---|
1 | .\" roar_simple_play.3: |
---|
2 | |
---|
3 | .TH "roar_str2codec" "3" "May 2011" "RoarAudio" "System Manager's Manual: RoarAudio" |
---|
4 | |
---|
5 | .SH NAME |
---|
6 | roar_str2codec \- Get codec ID by codec name |
---|
7 | |
---|
8 | roar_codec2str \- Get codec name by ID |
---|
9 | |
---|
10 | .SH SYNOPSIS |
---|
11 | |
---|
12 | #include <roaraudio.h> |
---|
13 | |
---|
14 | int roar_str2codec (char * codec); |
---|
15 | char * roar_codec2str (int codec); |
---|
16 | |
---|
17 | .SH "DESCRIPTION" |
---|
18 | \fBroar_str2codec\fR converts a string to a RoarAudio Codec ID. It also supports some common aliases. |
---|
19 | \fBroar_codec2str\fR is the reverse operation of \fBroar_str2codec\fR: It get's a name by the ID given. |
---|
20 | If a \fBcodec\fR is valid the following should be true: |
---|
21 | roar_str2codec(roar_codec2str(codec)) == codec |
---|
22 | |
---|
23 | Note that because of aliasing and case insensitivity the revers operation needs not to be true. |
---|
24 | |
---|
25 | .SH "THREAD SAFETY" |
---|
26 | Because \fBroar_codec2str\fR returns a static unique pointer for each codec it is fully thread safe. |
---|
27 | |
---|
28 | .SH "RETURN VALUE" |
---|
29 | On success \fBroar_str2codec\fR returns a codec ID. On error, \-1 is returned. |
---|
30 | \fBroar_codec2str\fR returns the name of the codec or NULL on error. |
---|
31 | You must not free this pointer or write to it. |
---|
32 | |
---|
33 | .SH "EXAMPLES" |
---|
34 | FIXME |
---|
35 | |
---|
36 | .SH "SEE ALSO" |
---|
37 | \fBlibroar\fR(7), |
---|
38 | \fBRoarAudio\fR(7). |
---|
39 | |
---|
40 | .\" ll |
---|
Note: See
TracBrowser
for help on using the repository browser.