Loading...
Searching...
No Matches
juce::ToneGeneratorAudioSource Class Reference

## Detailed Description

A simple AudioSource that generates a sine wave.

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

- juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h

Inheritance diagram for juce::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 juce::AudioSource
virtual | ~AudioSource ()=default
| Destructor.

## Additional Inherited Members

Protected Member Functions inherited from juce::AudioSource
| AudioSource ()=default
| Creates an AudioSource.

## Constructors and Destructors

## ToneGeneratorAudioSource()

juce::ToneGeneratorAudioSource::ToneGeneratorAudioSource | ( |  | ) |

Creates a ToneGeneratorAudioSource.

Referenced by getNextAudioBlock().

## ~ToneGeneratorAudioSource()

juce::ToneGeneratorAudioSource::~ToneGeneratorAudioSource | ( |  | ) |

override

Destructor.

## Member Functions

## setAmplitude()

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

Sets the signal's amplitude.

## setFrequency()

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

Sets the signal's frequency.

## prepareToPlay()

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

override virtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

## releaseResources()

void juce::ToneGeneratorAudioSource::releaseResources | ( |  | ) |

override virtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

## getNextAudioBlock()

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

override virtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

References ToneGeneratorAudioSource().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited