swift
Loading...
Searching...
No Matches
equalizersampleprovider.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_SOUND_SAMPLEPROVIDER_EQUALIZERSAMPLEPROVIDER_H
7#define SWIFT_SOUND_SAMPLEPROVIDER_EQUALIZERSAMPLEPROVIDER_H
8
9#include <QSharedPointer>
10#include <QVector>
11
15
16namespace swift::sound::sample_provider
17{
20 {
21 VHFEmulation = 1
22 };
23
26 {
28
29 public:
31 CEqualizerSampleProvider(ISampleProvider *sourceProvider, EqualizerPresets preset, QObject *parent = nullptr);
32
34 int readSamples(QVector<float> &samples, qint64 count) override;
35
37 void setBypassEffects(bool value) { m_bypass = value; }
38
41 double getOutputGain() const;
42 void setOutputGain(double outputGain);
44
45 private:
46 void setupPreset(EqualizerPresets preset);
47
48 ISampleProvider *m_sourceProvider = nullptr;
49 int m_channels = 1;
50 bool m_bypass = false;
51 double m_outputGain = 1.0;
53 };
54} // namespace swift::sound::sample_provider
55
56#endif // SWIFT_SOUND_SAMPLEPROVIDER_EQUALIZERSAMPLEPROVIDER_H
CEqualizerSampleProvider(ISampleProvider *sourceProvider, EqualizerPresets preset, QObject *parent=nullptr)
Ctor.
int readSamples(QVector< float > &samples, qint64 count)
Read samples.
ISampleProvider(QObject *parent=nullptr)
Ctor.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
#define SWIFT_SOUND_EXPORT
Export a class or function from the library.