Switchboard SDK
Loading...
Searching...
No Matches
switchboard::ImpulseGenerator Class Reference

Generates impulse signal. More...

#include <ImpulseGenerator.hpp>

Inheritance diagram for switchboard::ImpulseGenerator:
switchboard::Generator

Public Member Functions

 ImpulseGenerator (const float frequency=440.0f)
 ImpulseGenerator constructor.
 
- Public Member Functions inherited from switchboard::Generator
 Generator (const float frequency=440.0f)
 Generator constructor.
 
 Generator (const Generator &generator)
 Generator copy constructor.
 
virtual ~Generator ()=default
 Generator destructor.
 
float getFrequency () const
 Gets the current frequency value of the generated signal.
 
void setFrequency (const float frequency)
 Sets the frequency of the generated signal.
 
float getAmplitude () const
 Gets the current amplitude value of the generated signal.
 
void setAmplitude (const float amplitude)
 Sets the amplitude of the generated signal.
 
GeneratorType getType ()
 Gets the type of the Generator.
 
template<typename T >
void generate (T *buffer, const uint numberOfSamples, const uint sampleRate)
 Generates the audio data into a data buffer.
 
template<typename T >
void generate (AudioBuffer< T > &audioBuffer)
 Generates the audio data into an audio buffer.
 

Additional Inherited Members

- Protected Member Functions inherited from switchboard::Generator
void stepPhase ()
 
- Protected Attributes inherited from switchboard::Generator
float phase
 
GeneratorType type
 

Detailed Description

Generates impulse signal.

Impulse generator

Constructor & Destructor Documentation

◆ ImpulseGenerator()

switchboard::ImpulseGenerator::ImpulseGenerator ( const float frequency = 440.0f)

ImpulseGenerator constructor.

Parameters
frequencyThe initial frequency in Hz. Default value is 440 Hz.