40 PString Decode(
const short * sampleData, PINDEX numSamples,
unsigned mult = 1,
unsigned div = 1);
148 unsigned milliseconds,
155 bool Juxtapose(
unsigned frequency1,
unsigned frequency2,
unsigned milliseconds,
unsigned volume);
156 bool Modulate (
unsigned frequency,
unsigned modulate,
unsigned milliseconds,
unsigned volume);
157 bool PureTone (
unsigned frequency,
unsigned milliseconds,
unsigned volume);
158 bool Silence (
unsigned milliseconds);
160 unsigned CalcSamples(
unsigned milliseconds,
unsigned frequency1,
unsigned frequency2 = 0);
162 void AddSample(
int sample,
unsigned volume);
188 const char * dtmf = NULL,
222 double frequency2 = 0,
269 #endif // PTLIB_DTMF_H
void GenerateDialTone()
Generate PCM data for 1 second of US standard dial tone of 350/440hz.
Definition: dtmf.h:239
int h[NumTones]
Definition: dtmf.h:54
bool Generate(const PString &descriptor)
Generate a tone using the specified descriptor.
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
char key[256]
Definition: dtmf.h:48
this class can be used to generate PCM data for DTMF tones at a sample rate of 8khz ...
Definition: dtmf.h:177
PDTMFEncoder(const char *dtmf=NULL, unsigned milliseconds=DefaultToneLen)
Create PCM data for the specified DTMF sequence.
int p1[NumTones]
Definition: dtmf.h:51
This class can be used to generate PCM data for tones (such as telephone calling tones and DTMF) at a...
Definition: dtmf.h:102
unsigned m_sampleRate
Definition: dtmf.h:164
int inputAmplitude
Definition: dtmf.h:55
void GenerateBusyTone()
Generate PCM data for a single cadence of the US standard busy tone of 480/620hz for 1/2 second...
Definition: dtmf.h:248
PTones(unsigned masterVolume=MaxVolume, unsigned sampleRate=DefaultSampleRate)
Create an empty tone buffer.
void AddTone(const char *str, unsigned milliseconds=DefaultToneLen)
Add the PCM data for the specified tone sequence to the buffer.
char DtmfChar(PINDEX i)
Convenience function to get the ASCII character for a DTMF index, where the index varies from 0 to 15...
int sampleCount
Definition: dtmf.h:55
int k[NumTones]
Definition: dtmf.h:54
unsigned m_masterVolume
Definition: dtmf.h:166
void AddSample(int sample, unsigned volume)
bool Juxtapose(unsigned frequency1, unsigned frequency2, unsigned milliseconds, unsigned volume)
unsigned m_lastFrequency2
Definition: dtmf.h:168
int m_angle2
Definition: dtmf.h:169
The character string class.
Definition: pstring.h:108
int m_angle1
Definition: dtmf.h:169
unsigned m_maxFrequency
Definition: dtmf.h:165
Array of short integers.
Definition: array.h:589
bool PureTone(unsigned frequency, unsigned milliseconds, unsigned volume)
int tonesDetected
Definition: dtmf.h:55
char m_lastOperation
Definition: dtmf.h:167
unsigned CalcSamples(unsigned milliseconds, unsigned frequency1, unsigned frequency2=0)
unsigned m_lastFrequency1
Definition: dtmf.h:168
int y[NumTones]
Definition: dtmf.h:54
bool Silence(unsigned milliseconds)
void GenerateRingBackTone()
Generate PCM data for a single cadence of the US standard ring tone of 440/480hz for 2 seconds...
Definition: dtmf.h:230
PString Decode(const short *sampleData, PINDEX numSamples, unsigned mult=1, unsigned div=1)
bool Modulate(unsigned frequency, unsigned modulate, unsigned milliseconds, unsigned volume)
Ultimate parent class for all objects in the class library.
Definition: object.h:1118