mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +08:00
AFV initial commit
This commit is contained in:
committed by
Mat Sutcliffe
parent
7030302e73
commit
b5a2f2ad13
32
src/blacksound/sampleprovider/simplecompressoreffect.h
Normal file
32
src/blacksound/sampleprovider/simplecompressoreffect.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef SIMPLECOMPRESSOREFFECT_H
|
||||
#define SIMPLECOMPRESSOREFFECT_H
|
||||
|
||||
#include "blacksound/blacksoundexport.h"
|
||||
#include "sampleprovider.h"
|
||||
#include "blacksound/dsp/SimpleComp.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
|
||||
class BLACKSOUND_EXPORT SimpleCompressorEffect : public ISampleProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SimpleCompressorEffect(ISampleProvider *source, QObject *parent = nullptr);
|
||||
|
||||
virtual int readSamples(QVector<qint16> &samples, qint64 count) override;
|
||||
|
||||
void setEnabled(bool enabled);
|
||||
void setMakeUpGain(double gain);
|
||||
|
||||
private:
|
||||
|
||||
QTimer m_timer;
|
||||
ISampleProvider *m_sourceStream;
|
||||
bool m_enabled = true;
|
||||
chunkware_simple::SimpleComp m_simpleCompressor;
|
||||
const int channels = 1;
|
||||
};
|
||||
|
||||
#endif // SIMPLECOMPRESSOREFFECT_H
|
||||
Reference in New Issue
Block a user