Basic audio file access class. More...
#include <audio.h>
Static Public Member Functions | |
static bool | access (audiobuffer *buffer, const char *path, timeout_t preferred=0) |
Access an existing audio file to play. | |
static bool | append (audiobuffer *buffer, const char *path, timeout_t preferred=0) |
Append audio to an existing file. | |
static bool | create (audiobuffer *buffer, const char *path, timeout_t preferred=0, const char *note=NULL, const audiocodec *encoding=NULL, unsigned mode=0640) |
Create a new file to record audio into. | |
static bool | info (audiobuffer *buffer, const char *path, timeout_t framing=0) |
Protected Types | |
enum | { RAW, AU, RIFF, WAV } |
Protected Member Functions | |
bool | append (void) |
bool | flush (void) |
fd_t | handle (void) |
timeout_t | length (void) |
timeout_t | locate (void) |
void | open (const char *path, fsys::access_t access, size_t objsize, timeout_t framing) |
operator bool () | |
bool | rewind (void) |
bool | seek (timeout_t position) |
timeout_t | skip (timeout_t offset) |
bool | trim (timeout_t backup) |
Protected Attributes | |
unsigned | bufend |
size_t | bufio |
unsigned | bufpos |
fsys::offset_t | current |
enum ucc::audiofile:: { ... } | filetype |
fsys | fs |
uint8_t | header [40] |
fsys::offset_t | headersize |
fsys::offset_t | hiwater |
size_t | maxio |
size_t | minio |
Basic audio file access class.
This holds common methods used for manipulating audio files through frame buffering. Additional reader and writer objects are derived to handle file access specific to each.
Definition at line 369 of file audio.h.
static bool ucc::audiofile::access | ( | audiobuffer * | buffer, | |
const char * | path, | |||
timeout_t | preferred = 0 | |||
) | [static] |
Access an existing audio file to play.
buffer | to stream frames through. | |
path | of file to access. | |
preferred | I/O framing. |
static bool ucc::audiofile::append | ( | audiobuffer * | buffer, | |
const char * | path, | |||
timeout_t | preferred = 0 | |||
) | [static] |
Append audio to an existing file.
buffer | to use for appending frames. | |
path | of file to append. | |
preferred | I/O framing. |
static bool ucc::audiofile::create | ( | audiobuffer * | buffer, | |
const char * | path, | |||
timeout_t | preferred = 0 , |
|||
const char * | note = NULL , |
|||
const audiocodec * | encoding = NULL , |
|||
unsigned | mode = 0640 | |||
) | [static] |
Create a new file to record audio into.
buffer | to stream frames through. | |
path | of file to access. | |
preferred | I/O framing. | |
note | to attach if format allows, NULL if none. | |
encoding | of target or 0 for default. | |
mode | of access for new file. |