mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T730, code style, adding namespaces
This commit is contained in:
committed by
Mat Sutcliffe
parent
329b1e8c9a
commit
99edc9cb13
@@ -1,5 +1,15 @@
|
||||
#ifndef EQUALIZERSAMPLEPROVIDER_H
|
||||
#define EQUALIZERSAMPLEPROVIDER_H
|
||||
/* Copyright (C) 2019
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
|
||||
* or distributed except according to the terms contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKSOUND_SAMPLEPROVIDER_EQUALIZERSAMPLEPROVIDER_H
|
||||
#define BLACKSOUND_SAMPLEPROVIDER_EQUALIZERSAMPLEPROVIDER_H
|
||||
|
||||
#include "blacksound/blacksoundexport.h"
|
||||
#include "blacksound/sampleprovider/sampleprovider.h"
|
||||
@@ -8,34 +18,41 @@
|
||||
#include <QSharedPointer>
|
||||
#include <QVector>
|
||||
|
||||
enum EqualizerPresets
|
||||
namespace BlackSound
|
||||
{
|
||||
VHFEmulation = 1
|
||||
};
|
||||
namespace SampleProvider
|
||||
{
|
||||
//! Equalizer
|
||||
enum EqualizerPresets
|
||||
{
|
||||
VHFEmulation = 1
|
||||
};
|
||||
|
||||
class BLACKSOUND_EXPORT EqualizerSampleProvider : public ISampleProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
class BLACKSOUND_EXPORT CEqualizerSampleProvider : public ISampleProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EqualizerSampleProvider(ISampleProvider *sourceProvider, EqualizerPresets preset, QObject *parent = nullptr);
|
||||
public:
|
||||
CEqualizerSampleProvider(ISampleProvider *sourceProvider, EqualizerPresets preset, QObject *parent = nullptr);
|
||||
|
||||
virtual int readSamples(QVector<qint16> &samples, qint64 count) override;
|
||||
virtual int readSamples(QVector<qint16> &samples, qint64 count) override;
|
||||
|
||||
void setBypassEffects(bool value) { m_bypass = value; }
|
||||
void setBypassEffects(bool value) { m_bypass = value; }
|
||||
|
||||
double outputGain() const;
|
||||
void setOutputGain(double outputGain);
|
||||
double outputGain() const;
|
||||
void setOutputGain(double outputGain);
|
||||
|
||||
private:
|
||||
void setupPreset(EqualizerPresets preset);
|
||||
private:
|
||||
void setupPreset(EqualizerPresets preset);
|
||||
|
||||
ISampleProvider *m_sourceProvider;
|
||||
ISampleProvider *m_sourceProvider;
|
||||
|
||||
int m_channels = 1;
|
||||
bool m_bypass = false;
|
||||
double m_outputGain = 1.0;
|
||||
QVector<BiQuadFilter> m_filters;
|
||||
};
|
||||
int m_channels = 1;
|
||||
bool m_bypass = false;
|
||||
double m_outputGain = 1.0;
|
||||
QVector<BiQuadFilter> m_filters;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // EQUALIZERSAMPLEPROVIDER_H
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user