Audio Pipe
The Pipe class is an efficient implementation of a FIFO data pipe (also called ringbuffer) that is thread-safe and optimized for audio streaming operations.
- atomicity of read/write operations is insured by mutex locking (pthreads)
- two audio DSP conversions can be applied on both ends (saving on the memory copy operation)
- easily extensible to support more DSP conversion algorithms
This class is being used in MuSE streaming application and just starting to be adopted in FreeJ
The set_output_type and set_input_type take both a string as an argument which is the name of the conversion type adopted in reading (output) and writing (input)
| copy_byte | simple memcpy(3) of data, amount is in bytes |
| copy_int16_to_float | int to float conversion using int/32768.0f |
| copy_float_to_int16 | float to int (16bit) conversion using lrintf(3) |
| mix_int16_to_int32 | sum of a int16 over int32 |
The Pipe class is released under GNU GPL and is
- Copyright (c) 2001 Charles Samuels <charles \@\ kde.org>
- Copyright (c) 2002 - 2005 Denis Rojo <jaromil \@\ dyne.org>
The latest version can be checked out from subversion at the addresses
- svn://dyne.org/rastasoft/muse/muse-0.9/src/pipe.cpp
- svn://dyne.org/rastasoft/muse/muse-0.9/src/pipe.h
You can mail patches to <jaromil \@\ dyne.org>
