6#ifndef SWIFT_SOUND_SAMPLEPROVIDER_SINUSGENERATOR_H
7#define SWIFT_SOUND_SAMPLEPROVIDER_SINUSGENERATOR_H
14namespace swift::sound::sample_provider
29 void setGain(
double gain) { m_gain = gain; }
32 void setFrequency(
double frequencyHz);
36 double m_frequencyHz = 0.0;
37 double m_sampleRate = 48000;
39 static constexpr double s_twoPi = 2 * M_PI;
int readSamples(QVector< float > &samples, qint64 count)
Read samples.
void setGain(double gain)
Set the gain.
CSinusGenerator(double frequencyHz, QObject *parent=nullptr)
Ctor.
ISampleProvider(QObject *parent=nullptr)
Ctor.
QObject * parent() const const
#define SWIFT_SOUND_EXPORT
Export a class or function from the library.