Generates a Sound with the help of sin() function. If performance is of concern, I suggest to use theSineFromTable or the FastSineGenerator.
More...
#include <SoundGenerator.h>
template<class T = int16_t>
class audio_tools::SineGenerator< T >
Generates a Sound with the help of sin() function. If performance is of concern, I suggest to use theSineFromTable or the FastSineGenerator.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ SineGenerator()
template<class T = int16_t>
◆ applyRamp()
template<class T = int16_t>
◆ audioInfo()
template<class T = int16_t>
◆ begin() [1/4]
template<class T = int16_t>
◆ begin() [2/4]
template<class T = int16_t>
◆ begin() [3/4]
template<class T = int16_t>
| bool begin |
( |
AudioInfo |
info, |
|
|
float |
frequency |
|
) |
| |
|
inline |
◆ begin() [4/4]
template<class T = int16_t>
| bool begin |
( |
int |
channels, |
|
|
int |
sample_rate, |
|
|
float |
frequency |
|
) |
| |
|
inline |
◆ defaultConfig()
template<class T = int16_t>
◆ end()
template<class T = int16_t>
◆ isActive()
template<class T = int16_t>
| virtual bool isActive |
( |
| ) |
|
|
inlinevirtualinherited |
Checks if the begin method has been called - after end() isActive is false.
◆ logStatus()
template<class T = int16_t>
◆ readBytes()
template<class T = int16_t>
| virtual size_t readBytes |
( |
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinevirtualinherited |
Provides the data as byte array with the requested number of channels.
◆ readBytesFrames()
template<class T = int16_t>
| size_t readBytesFrames |
( |
uint8_t * |
buffer, |
|
|
size_t |
lengthBytes, |
|
|
int |
frames, |
|
|
int |
channels |
|
) |
| |
|
inlineprotectedinherited |
◆ readBytesFromBuffer()
template<class T = int16_t>
| size_t readBytesFromBuffer |
( |
uint8_t * |
buffer, |
|
|
size_t |
lengthBytes, |
|
|
int |
frame_size, |
|
|
int |
channels |
|
) |
| |
|
inlineprotectedinherited |
◆ readSample()
template<class T = int16_t>
◆ recalculatePlayTime()
template<class T = int16_t>
| void recalculatePlayTime |
( |
| ) |
|
|
inlineprotectedinherited |
◆ setAmplitude()
template<class T = int16_t>
| void setAmplitude |
( |
float |
amp | ) |
|
|
inline |
◆ setAudioInfo()
template<class T = int16_t>
◆ setFrequency()
template<class T = int16_t>
| void setFrequency |
( |
float |
frequency | ) |
|
|
inlineoverridevirtual |
Defines the frequency - after the processing has been started.
Reimplemented from SoundGenerator< T >.
◆ setPlayTime()
template<class T = int16_t>
| void setPlayTime |
( |
uint32_t |
playMs, |
|
|
uint8_t |
upPercent = 20, |
|
|
uint8_t |
downPercent = 30 |
|
) |
| |
|
inlineinherited |
Defines the play time in ms and the ramp up and ramp down time in percent.
◆ active
template<class T = int16_t>
◆ activeWarningIssued
template<class T = int16_t>
| bool activeWarningIssued = false |
|
protectedinherited |
◆ currentSample
template<class T = int16_t>
| uint32_t currentSample = 0 |
|
protectedinherited |
◆ double_Pi
template<class T = int16_t>
| const float double_Pi = 2.0f * PI |
|
protected |
◆ downPercent
template<class T = int16_t>
◆ factor
template<class T = int16_t>
◆ info
template<class T = int16_t>
◆ m_amplitude
template<class T = int16_t>
◆ m_cycles
template<class T = int16_t>
◆ m_deltaTime
template<class T = int16_t>
◆ m_frequency
template<class T = int16_t>
| volatile float m_frequency = 0.0f |
|
protected |
◆ m_phase
template<class T = int16_t>
◆ playMs
template<class T = int16_t>
◆ playSamples
template<class T = int16_t>
◆ rampDownDec
template<class T = int16_t>
◆ rampDownSamples
template<class T = int16_t>
| uint32_t rampDownSamples = 0 |
|
protectedinherited |
◆ rampUpInc
template<class T = int16_t>
◆ ring_buffer
template<class T = int16_t>
◆ upPercent
template<class T = int16_t>
◆ upSamples
template<class T = int16_t>
The documentation for this class was generated from the following file: