ccAudio
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
ost::TelTone Class Reference

An object that is used to sequence and extract telephony tones based on a telephony tone descriptor retrieved from the parsed international telephony tone database. More...

#include <audio2.h>

Inheritance diagram for ost::TelTone:
ost::AudioTone ost::Audio

List of all members.

Classes

struct  _tonedef
struct  _tonekey

Public Types

typedef struct
ost::TelTone::_tonedef 
tonedef_t
typedef struct
ost::TelTone::_tonekey 
tonekey_t

Public Member Functions

 TelTone (tonekey_t *key, Level level, timeout_t frame=20)
 Create a tone sequencing object for a specific telephony tone key id.
 ~TelTone ()
Linear getFrame (void)
 Generate and retrieve one frame of linear audio data for the telephony tone sequence being created.
bool isComplete (void)
 Check if all audio frames for this tone has been created.

Static Public Member Functions

static bool load (const char *pathname, const char *locale=NULL)
 Load a teltones database file into memory.
static tonekey_tfind (const char *tone, const char *locale=NULL)
 find an entry in the teltones database.

Protected Attributes

tonekey_ttone
tonedef_tdef
unsigned remaining
unsigned silent
unsigned count
timeout_t framing
Level level
bool complete

Detailed Description

An object that is used to sequence and extract telephony tones based on a telephony tone descriptor retrieved from the parsed international telephony tone database.

Author:
David Sugar <dyfet@ostel.com> telephony tone sequencing object.

Member Typedef Documentation


Constructor & Destructor Documentation

ost::TelTone::TelTone ( tonekey_t key,
Level  level,
timeout_t  frame = 20 
)

Create a tone sequencing object for a specific telephony tone key id.

Parameters:
keyfor telephony tone.
levelfor generated tones.
frametiming to use in processing.
ost::TelTone::~TelTone ( )

Member Function Documentation

static tonekey_t* ost::TelTone::find ( const char *  tone,
const char *  locale = NULL 
) [static]

find an entry in the teltones database.

Returns:
key of tone list if found, else NULL
Parameters:
tonename
localeto optionally search under
Linear ost::TelTone::getFrame ( void  ) [virtual]

Generate and retrieve one frame of linear audio data for the telephony tone sequence being created.

Returns:
pointer to samples generated.

Reimplemented from ost::AudioTone.

bool ost::TelTone::isComplete ( void  ) [virtual]

Check if all audio frames for this tone has been created.

Some telephony tones, such as dialtone, may be infinite...

Returns:
true if audio is complete.

Reimplemented from ost::AudioTone.

static bool ost::TelTone::load ( const char *  pathname,
const char *  locale = NULL 
) [static]

Load a teltones database file into memory.

Returns:
true if successful
Parameters:
pathnameof file to load.
localeto optionally load.

Member Data Documentation

bool ost::TelTone::complete [protected]
unsigned ost::TelTone::count [protected]
unsigned ost::TelTone::remaining [protected]
unsigned ost::TelTone::silent [protected]

The documentation for this class was generated from the following file: