Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

phTone Class Reference

The tone class is used to build sampled single and dual frequency tones that may be fed to the telephony device. generated sample tone. More...

#include <bayonne.h>

List of all members.

Public Methods

 phTone (const char *name, timeout_t duration, unsigned f)
 Create single frequency tone. More...

 phTone (const char *name, timeout_t duration, unsigned f1, unsigned f2)
 Create dual frequency tone. More...

 ~phTone ()
void Clear (void)
 If the telephony card is capable of generating it's own tones, then it can use the clear method to remove any allocated memory for sampled data.

unsigned char* getSamples (void)
 Fetch the sample area of the tone. More...

timeout_t getDuration (void)
 Get the duration of the tone. More...


Friends

phTone* getphTone (const char *name)


Detailed Description

The tone class is used to build sampled single and dual frequency tones that may be fed to the telephony device. generated sample tone.

Tones are defined in the "tones" section of bayonne.conf.

Author(s):
David Sugar.


Constructor & Destructor Documentation

phTone::phTone ( const char * name,
timeout_t duration,
unsigned f )
 

Create single frequency tone.

Parameters:
name   of tone.
duration   in milliseconds.
frequency   of tone.

phTone::phTone ( const char * name,
timeout_t duration,
unsigned f1,
unsigned f2 )
 

Create dual frequency tone.

Parameters:
name   of tone.
duration   in milliseconds.
first   frequency.
second   frequency.

phTone::~phTone ( )
 


Member Function Documentation

void phTone::Clear ( void )
 

If the telephony card is capable of generating it's own tones, then it can use the clear method to remove any allocated memory for sampled data.

timeout_t phTone::getDuration ( void ) [inline]
 

Get the duration of the tone.

Returns:
duration of tone.

unsigned char * phTone::getSamples ( void ) [inline]
 

Fetch the sample area of the tone.

Returns:
sample area.


Friends And Related Function Documentation

phTone* getphTone ( const char * name ) [friend]
 


The documentation for this class was generated from the following file:
Generated at Wed Apr 25 22:24:41 2001 for Bayonne by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000