#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. | |
| ~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. | |
| timeout_t | getDuration (void) |
| Get the duration of the tone. | |
| timeout_t | getPlaytime (void) |
| Get the duration of the tone. | |
Static Public Member Functions | |
| static unsigned char | linear2ulaw (int sample) |
| static unsigned char | linear2alaw (int sample) |
| static unsigned char | alaw2ulaw (unsigned char al) |
| static unsigned char | ulaw2alaw (unsigned char ul) |
| static short | ulaw2linear (unsigned char ul) |
| static short | alaw2linear (unsigned char al) |
Protected Attributes | |
| char | name [33] |
| unsigned char * | samples |
| timeout_t | duration |
| timeout_t | playtime |
| unsigned | freq1 |
| unsigned | freq2 |
Friends | |
| class | KeyTones |
| __EXPORT phTone * | getphTone (const char *name) |
Tones are defined in the "tones" section of bayonne.conf.
|
||||||||||||||||
|
Create single frequency tone.
|
|
||||||||||||||||||||
|
Create dual frequency tone.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
Get the duration of the tone.
|
|
|
Get the duration of the tone.
|
|
|
Fetch the sample area of the tone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.4