man phTone () - The tone class is used to build sampled single and dual frequency tones that may be fed to the telephony device. generated sample tone.
NAME
phTone - The tone class is used to build sampled single and dual frequency tones that may be fed to the telephony device. generated sample tone.
SYNOPSIS
#include <bayonne.h>
Public Member Functions
phTone (const char *name, timeout_t duration, unsigned f)
Create single frequency tone.
phTone (const char *name, timeout_t duration, unsigned f1, unsigned f2)
Create dual frequency tone.
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.
timeout_t getDuration (void)
Get the duration of the tone.
timeout_t getPlaytime (void)
Get the playtime of the tone.
Static Public Member Functions
unsigned char linear2ulaw (int sample)
unsigned char linear2alaw (int sample)
Protected Attributes
char name [33]
unsigned char * samples
timeout_t duration
timeout_t playtime
unsigned freq1
unsigned freq2
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: 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.
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.
timeout_t phTone::getPlaytime (void) [inline]
Get the playtime of the tone.
Returns: duration of tone.
unsigned char* phTone::getSamples (void) [inline]
Fetch the sample area of the tone.
Returns: sample area.
Author
Generated automatically by Doxygen for Bayonne from the source code.