ucc::audiobuffer Class Reference

Generic audio buffering and transcoding for audio sources and sinks. More...

#include <audio.h>

Inheritance diagram for ucc::audiobuffer:
Inheritance graph
[legend]
Collaboration diagram for ucc::audiobuffer:
Collaboration graph
[legend]

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)
audiocodecgetChannel (void)
unsigned long getContexts (void)
 Get number of i/o context switches performed for profiling.
unsigned getConversion (void)
audiocodecgetEncoding (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 audiobuffercreate (audiocodec *channel, timeout_t framing)
static audiobuffercreate (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
audiocodecencoding
unsigned long iocount
timeout_t limit

Detailed Description

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.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 282 of file audio.h.


Member Function Documentation

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]

Get number of i/o context switches performed for profiling.

Returns:
count of i/o operations since last allocate.

Definition at line 320 of file audio.h.


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208