JUCE: ToneGeneratorAudioSource Class Reference

JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ToneGeneratorAudioSource Class Reference
juce_audio_basics » sources

A simple AudioSource that generates a sine wave. More...

`#include <juce_ToneGeneratorAudioSource.h>`

Inheritance diagram for ToneGeneratorAudioSource:

## Public Member Functions
| ToneGeneratorAudioSource ()
| Creates a ToneGeneratorAudioSource.
| ~ToneGeneratorAudioSource () override
| Destructor.
void | setAmplitude (float newAmplitude)
| Sets the signal's amplitude.
void | setFrequency (double newFrequencyHz)
| Sets the signal's frequency.
void | prepareToPlay (int samplesPerBlockExpected, double sampleRate) override
| Implementation of the AudioSource method.
void | releaseResources () override
| Implementation of the AudioSource method.
void | getNextAudioBlock (const AudioSourceChannelInfo &) override
| Implementation of the AudioSource method.
Public Member Functions inherited from AudioSource
virtual | ~AudioSource ()=default
| Destructor.

## Additional Inherited Members
Protected Member Functions inherited from AudioSource
| AudioSource ()=default
| Creates an AudioSource.

## Detailed Description

A simple AudioSource that generates a sine wave.

## Constructor & Destructor Documentation

## ◆ ToneGeneratorAudioSource()

ToneGeneratorAudioSource::ToneGeneratorAudioSource | ( |  | ) |

Creates a ToneGeneratorAudioSource.

## ◆ ~ToneGeneratorAudioSource()

ToneGeneratorAudioSource::~ToneGeneratorAudioSource | ( |  | ) |
| override

Destructor.

## Member Function Documentation

## ◆ setAmplitude()

void ToneGeneratorAudioSource::setAmplitude | ( | float | newAmplitude | ) |

Sets the signal's amplitude.

## ◆ setFrequency()

void ToneGeneratorAudioSource::setFrequency | ( | double | newFrequencyHz | ) |

Sets the signal's frequency.

## ◆ prepareToPlay()

void ToneGeneratorAudioSource::prepareToPlay | ( | int | samplesPerBlockExpected,
|  | double | sampleRate
| ) |  |
| overridevirtual

Implementation of the AudioSource method.

Implements AudioSource.

## ◆ releaseResources()

void ToneGeneratorAudioSource::releaseResources | ( |  | ) |
| overridevirtual

Implementation of the AudioSource method.

Implements AudioSource.

## ◆ getNextAudioBlock()

void ToneGeneratorAudioSource::getNextAudioBlock | ( | const AudioSourceChannelInfo & |  | ) |
| overridevirtual

Implementation of the AudioSource method.

Implements AudioSource.

The documentation for this class was generated from the following file:

- juce_ToneGeneratorAudioSource.h