Generic audio buffering and transcoding for audio sources and sinks. More...
#include <audio.h>
Public Member Functions | |
linear_t | expand (encoded_t data) |
Unpack data pointer using convert buffer as working space. | |
unsigned | framesize (encoded_t data) |
unsigned | framesize (void) |
timeout_t | frametime (void) |
unsigned | getAllocated (void) |
unsigned | getAvailable (void) |
unsigned | getBackstore (void) |
unsigned | getBuffering (void) |
audiocodec * | getChannel (void) |
unsigned long | getContexts (void) |
Get number of i/o context switches performed for profiling. | |
unsigned | getConversion (void) |
audiocodec * | getEncoding (void) |
virtual fd_t | handle (void) |
unsigned | pull (encoded_t data, unsigned len) |
unsigned | push (encoded_t data, unsigned len) |
virtual void | release (void) |
unsigned | text (char *str, size_t size) |
Static Public Member Functions | |
static audiobuffer * | create (audiocodec *channel, timeout_t framing) |
static audiobuffer * | create (timeout_t limit) |
Protected Member Functions | |
bool | assign (size_t size, audiocodec *format=((void *) 0), timeout_t framing=0) |
encoded_t | getBuffer (void) |
linear_t | getConvert (void) |
bool | transbuffer (audiocodec *from, audiocodec *to) |
encoded_t | transcode (encoded_t source, encoded_t target, audiocodec *from, audiocodec *to) |
Protected Attributes | |
union { | |
audiocodec * channel | |
audiocodec * channelbase | |
}; | |
unsigned | allocsize |
unsigned | backio |
unsigned | backpos |
unsigned | backstore |
encoded_t | buffer |
unsigned | buffering |
unsigned | convert |
audiocodec * | encoding |
unsigned long | iocount |
timeout_t | limit |
Generic audio buffering and transcoding for audio sources and sinks.
This is used to create working storage to support access to and conversion from different audio sources, such as files or tone generators. These can all manipulate this common audiobuffer base class that has space for audio conversion buffers.
Definition at line 282 of file audio.h.
linear_t ucc::audiobuffer::expand | ( | encoded_t | data | ) |
Unpack data pointer using convert buffer as working space.
This offers a convenient way to get a linear sample out of an existing encoded frames without having to allocate an additional buffer. The encoded data is assumed to be in the format of the frame.
unsigned long ucc::audiobuffer::getContexts | ( | void | ) | [inline] |