Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

PCM fifo
[C API]


Detailed Description

PCM fifo.

dcplaya fifo is a thread safe FIFO that include a back buffer capability in order to get the old PCM for sound analysis.

Author:
benjamin gerard


Files

file  fifo.h
 PCM fifo with bak-buffer.


Functions

int fifo_init (int size)
 Initialize the fifo.

int fifo_resize (int size)
 Change the size of the fifo.

int fifo_start (void)
 Restart the fifo.

void fifo_stop (void)
 Stop the fifo.

void fifo_read_lock (int *i1, int *n1, int *i2, int *n2)
void fifo_write_lock (int *i1, int *n1, int *i2, int *n2)
void fifo_unlock (void)
int fifo_free (void)
 Get fifo free (writable) space.

int fifo_used (void)
 Get fifo used (readale) space.

int fifo_size (void)
 Get fifo size.

int fifo_bak (void)
 Get bak-buffer size.

void fifo_state (int *r, int *w, int *b)
int fifo_fill ()
int fifo_read (int *buf, int n)
 Read stereo PCM from fifo.

int fifo_readbak (int *buf, int n)
 Read stereo PCM from fifo back-buffer.

int fifo_write (const int *buf, int n)
 Write stereo PCM into fifo.

int fifo_write_mono (const short *buf, int n)
 Write mono PCM into fifo.


Function Documentation

int fifo_init int  size  ) 
 

Initialize the fifo.

Parameters:
size Number of sample in fifo (power of 2)
Returns:
error-code

int fifo_resize int  size  ) 
 

Change the size of the fifo.

Parameters:
size Number of sample in fifo (power of 2)
Returns:
size (may be unchanged on failure)


dcplaya documentation version 1.2 Generated on January 2004 by doxygen 1.3.5