#include <media.hpp>
◆ ToneGenerator()
pj::ToneGenerator::ToneGenerator |
( |
| ) |
|
◆ ~ToneGenerator()
pj::ToneGenerator::~ToneGenerator |
( |
| ) |
|
Destructor. This will unregister the tone generator port from the conference bridge.
◆ createToneGenerator()
void pj::ToneGenerator::createToneGenerator |
( |
unsigned |
clock_rate = 16000 , |
|
|
unsigned |
channel_count = 1 |
|
) |
| |
throw | ( | Error |
| ) | | |
Create tone generator and register the port to the conference bridge.
◆ isBusy()
bool pj::ToneGenerator::isBusy |
( |
| ) |
const |
Check if the tone generator is still busy producing some tones.
- Returns
- Non-zero if busy.
◆ stop()
void pj::ToneGenerator::stop |
( |
| ) |
|
throw | ( | Error |
| ) | | |
Instruct the tone generator to stop current processing.
◆ rewind()
void pj::ToneGenerator::rewind |
( |
| ) |
|
throw | ( | Error |
| ) | | |
Rewind the playback. This will start the playback to the first tone in the playback list.
◆ play()
void pj::ToneGenerator::play |
( |
const ToneDescVector & |
tones, |
|
|
bool |
loop = false |
|
) |
| |
throw | ( | Error |
| ) | | |
Instruct the tone generator to play single or dual frequency tones with the specified duration. The new tones will be appended to currently playing tones, unless stop() is called before calling this function. The playback will begin as soon as the tone generator is connected to other media.
- Parameters
-
tones | Array of tones to be played. |
loop | Play the tone in a loop. |
◆ playDigits()
void pj::ToneGenerator::playDigits |
( |
const ToneDigitVector & |
digits, |
|
|
bool |
loop = false |
|
) |
| |
throw | ( | Error |
| ) | | |
Instruct the tone generator to play multiple MF digits with each of the digits having individual ON/OFF duration. Each of the digit in the digit array must have the corresponding descriptor in the digit map. The new tones will be appended to currently playing tones, unless stop() is called before calling this function. The playback will begin as soon as the tone generator is connected to a sink media.
- Parameters
-
digits | Array of MF digits. |
loop | Play the tone in a loop. |
◆ getDigitMap()
Get the digit-map currently used by this tone generator.
- Returns
- The digitmap currently used by the tone generator
◆ setDigitMap()
Set digit map to be used by the tone generator.
- Parameters
-
digit_map | Digitmap to be used by the tone generator. |
The documentation for this class was generated from the following file: