source: roaraudio/doc/man3/roar_vs_buffer.3 @ 5058:45211d6eeea9

Last change on this file since 5058:45211d6eeea9 was 5058:45211d6eeea9, checked in by phi, 13 years ago

Added manpages for all VS functions (Closing: #4)

File size: 1.8 KB
Line 
1.TH "roar_vs_buffer" "3" "June 2011" "RoarAudio" "RoarAudio Programmer's Manual"
2
3.SH NAME
4roar_vs_buffer \- Use buffered mode streams
5
6.SH SYNOPSIS
7
8#include <roaraudio.h>
9
10int roar_vs_buffer(roar_vs_t * vss, size_t buffer, int * error);
11
12ssize_t roar_vs_get_avail_read(roar_vs_t * vss, int * error);
13
14ssize_t roar_vs_get_avail_write(roar_vs_t * vss, int * error);
15
16int     roar_vs_reset_buffer(roar_vs_t * vss, int writering, int readring, int * error);
17
18.SH "DESCRIPTION"
19These functions controls the buffered mode of the VS object. Using this mode is not recommended.
20
21\fBroar_vs_buffer()\fR initializes the buffered mode. It takes the size for the buffer as argument.
22The size should be a power of two. Common values include 2048 and 4096.
23
24\fBroar_vs_get_avail_read()\fR and \fBroar_vs_get_avail_write()\fR return the amount of free space
25in the read and write buffer.
26
27\fBroar_vs_reset_buffer()\fR resets the read and/or write buffer. This means the data in the buffers is discarded.
28This does not happen frame aligned and may result in broken audio.
29
30Buffers are not flushed automaically. To do this use \fBroar_vs_iterate\fR(3) or \fBroar_vs_run\fR(3).
31
32.SH "PARAMETERS"
33.TP
34\fBvss\fR
35The VS object to be used.
36
37.TP
38\fBbuffer\fR
39The size of the buffer to be used in bytes.
40
41.TP
42\fBwritering\fR, \fBreadring\fR
43Selects the buffer to reset. Must be ROAR_VS_TRUE or ROAR_VS_FALSE.
44
45.TP
46\fBerror\fR
47This is a pointer to a integer used to store the error value in case of error.
48This can be NULL if not used but it is very recommended to use this error value to report
49good error messages to the user.
50
51.SH "RETURN VALUE"
52On success these calls return 0.
53roar_vs_get_avail_read() and roar_vs_get_avail_write() return the free space in the corresponding buffer.
54On error, \-1 is returned.
55
56.SH "EXAMPLES"
57FIXME
58
59.SH "SEE ALSO"
60\fBroarvs\fR(7),
61\fBlibroar\fR(7),
62\fBRoarAudio\fR(7).
63
64.\" ll
Note: See TracBrowser for help on using the repository browser.