---
name: "AudioTone"
section: "3cc"
platform: "linux"
package: "libccaudio-dev"
version: "1.2.0-1+b1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/AudioTone/3cc"
---

# AudioTone(3cc)

The tone class is used to construct or generate a tone sample in memory.generate audio sample in memory.

## NAME

AudioTone - The tone class is used to construct or generate a tone sample in memory.generate audio sample in memory.

## SYNOPSIS

`#include <audio.h>`

Inherits **AudioSample**.

### Public Member Functions

**AudioTone** (unsigned size, unsigned f1=0, unsigned f2=0, unsigned rate=8000)\
 void **fill** (unsigned max=0)\
 *Fill the current sample frame with more tone data.*  void **setFreq** (unsigned f1, unsigned f2=0)\

### Protected Attributes

double **p1**\
 double **p2**\
 double **v1**\
 double **v2**\
 double **fa1**\
 double **fa2**\

## Detailed Description

The tone class is used to construct or generate a tone sample in memory.generate audio sample in memory.

These tone samples can be either single or dual tones, and are created as linear samples of a specified sample rate.

**Author:**

David Sugar \<dyfet@ostel.com\>

## Author

Generated automatically by Doxygen for ccAudio from the source code.
