libvpb
4.2.55
|
Tone definition structure. More...
#include <vpbapi.h>
Public Attributes | |
unsigned short | freq1 |
frequency of first tone in Hz | |
unsigned short | freq2 |
frequency of second tone in Hz | |
unsigned short | freq3 |
frequency of third tone in Hz | |
float | level1 |
first tone level in dB, -inf to 0dB | |
float | level2 |
second tone level in dB, -inf to 0dB | |
float | level3 |
third tone level in dB, -inf to 0dB | |
unsigned long | ton |
on time in ms , if 0 tone is continuous | |
unsigned long | toff |
off time in ms | |
VPB_TONE * | next |
Pointer to the next tone in a sequence. |
Tone definition structure.
This structure is used to define tone data for the programmable tone generator.
For example:
// A single continuous tone VPB_TONE au_dial = { 400, 425, 450, -13, -13, -13, 0, 0, NULL }; // A two cadence continuous tone VPB_TONE au_ring2 = { 400, 425, 450, -13, -13, 0, 400, 2000, &au_ring2 }; VPB_TONE au_ring = { 400, 425, 450, -13, -13, 0, 400, 200, &au_ring2 }; // A three tone one-shot sequence VPB_TONE us_sit2 = { 1800, 0, 0, -13, 0, 0, 330, 0, NULL }; VPB_TONE us_sit1 = { 1400, 0, 0, -13, 0, 0, 330, 0, &us_sit2 }; VPB_TONE us_sit = { 950, 0, 0, -13, 0, 0, 330, 0, &us_sit1 }; vpb_playtone_sync(h, au_dial); vpb_playtone_sync(h, au_ring); vpb_playtone_sync(h, us_sit);
Pointer to the next tone in a sequence.
For tone sequences this field should should point to the next tone definition in the sequence. It should be NULL
for a single tone and for the last tone in a one-shot sequence of tones. As a special case for the last tone of a sequence, if this field points to the object that contains it then the whole sequence will be continuously repeated until explicitly terminated by the user application.