---
name: "ost_TelTone"
section: "3"
platform: "linux"
package: "libccaudio2-doc"
version: "1.0.0-2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/ost_TelTone"
---

# ost\_TelTone(3)

An object that is used to sequence and extract telephony tones based on a telephony tone descriptor retrieved from the parsed international telephony tone database.

## NAME

ost::TelTone - An object that is used to sequence and extract telephony tones based on a telephony tone descriptor retrieved from the parsed international telephony tone database.

## SYNOPSIS

`#include <audio2.h>`

Inherits **ost::AudioTone**.

### Public Types

typedef struct **ost::TelTone::\_tonedef** **tonedef\_t**\
 typedef struct **ost::TelTone::\_tonekey** **tonekey\_t**\

### Public Member Functions

**TelTone** (**tonekey\_t** \*key, **Level** **level**, **timeout\_t** **frame**=20)\
 *Create a tone sequencing object for a specific telephony tone key id.*  **~TelTone** ()\
 **Linear** **getFrame** (void)\
 *Generate and retrieve one frame of linear audio data for the telephony tone sequence being created.*  bool **isComplete** (void)\
 *Check if all audio frames for this tone has been created.*

### Static Public Member Functions

static bool **load** (const char \*pathname, const char \*locale=NULL)\
 *Load a teltones database file into memory.*  static **tonekey\_t** \* **find** (const char \***tone**, const char \*locale=NULL)\
 *find an entry in the teltones database.*

### Protected Attributes

**tonekey\_t** \* **tone**\
 **tonedef\_t** \* **def**\
 unsigned **remaining**\
 unsigned **silent**\
 unsigned **count**\
 **timeout\_t** **framing**\
 **Level** **level**\
 bool **complete**\

### Classes

struct **\_tonedef**\
 struct **\_tonekey**\

## Detailed Description

An object that is used to sequence and extract telephony tones based on a telephony tone descriptor retrieved from the parsed international telephony tone database.

**Author:**

David Sugar \<dyfet@ostel.com\> telephony tone sequencing object.

## Member Typedef Documentation

### typedef struct ost::TelTone::\_tonedef ost::TelTone::tonedef\_t

### typedef struct ost::TelTone::\_tonekey ost::TelTone::tonekey\_t

## Constructor & Destructor Documentation

### ost::TelTone::TelTone (tonekey\_t \* key, Level level, timeout\_t frame = `20`)

Create a tone sequencing object for a specific telephony tone key id.

**Parameters:**

*key* for telephony tone. \
 *level* for generated tones. \
 *frame* timing to use in processing.

### ost::TelTone::~TelTone ()

## Member Function Documentation

### Linear ost::TelTone::getFrame (void)` [virtual]`

Generate and retrieve one frame of linear audio data for the telephony tone sequence being created.

**Returns:**

pointer to samples generated.

Reimplemented from **ost::AudioTone**.

### bool ost::TelTone::isComplete (void)` [virtual]`

Check if all audio frames for this tone has been created.

Some telephony tones, such as dialtone, may be infinite...

**Returns:**

true if audio is complete.

Reimplemented from **ost::AudioTone**.

### static bool ost::TelTone::load (const char \* pathname, const char \* locale = `NULL`)` [static]`

Load a teltones database file into memory.

**Returns:**

true if successful

**Parameters:**

*pathname* of file to load. \
 *locale* to optionally load.

### static tonekey\_t\* ost::TelTone::find (const char \* tone, const char \* locale = `NULL`)` [static]`

find an entry in the teltones database.

**Returns:**

key of tone list if found, else NULL

**Parameters:**

*tone* name \
 *locale* to optionally search under

## Member Data Documentation

### tonekey\_t\* ost::TelTone::tone` [protected]`

### tonedef\_t\* ost::TelTone::def` [protected]`

### unsigned ost::TelTone::remaining` [protected]`

### unsigned ost::TelTone::silent` [protected]`

### unsigned ost::TelTone::count` [protected]`

### timeout\_t ost::TelTone::framing` [protected]`

### Level ost::TelTone::level` [protected]`

### bool ost::TelTone::complete` [protected]`

## Author

Generated automatically by Doxygen for ccAudio from the source code.
