swift
src
sound
sampleprovider
simplecompressoreffect.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_SIMPLECOMPRESSOREFFECT_H
7
#define SWIFT_SOUND_SAMPLEPROVIDER_SIMPLECOMPRESSOREFFECT_H
8
9
#include <QObject>
10
#include <QTimer>
11
12
#include "chunkware_dsp/SimpleComp.h"
13
14
#include "
sound/sampleprovider/sampleprovider.h
"
15
#include "
sound/swiftsoundexport.h
"
16
17
namespace
swift::sound::sample_provider
18
{
20
class
SWIFT_SOUND_EXPORT
CSimpleCompressorEffect
:
public
ISampleProvider
21
{
22
Q_OBJECT
23
24
public
:
26
CSimpleCompressorEffect
(
ISampleProvider
*source,
QObject
*parent =
nullptr
);
27
29
int
readSamples(
QVector<float>
&samples, qint64 count)
override
;
30
32
void
setEnabled(
bool
enabled);
33
35
void
setMakeUpGain(
double
gain);
36
38
void
setChannels(
int
channels);
39
40
private
:
41
QTimer
*m_timer =
nullptr
;
42
ISampleProvider
*m_sourceStream =
nullptr
;
43
bool
m_enabled =
true
;
44
int
m_channels = 1;
45
chunkware_simple::SimpleComp m_simpleCompressor;
46
};
47
}
// namespace swift::sound::sample_provider
48
49
#endif
// SWIFT_SOUND_SAMPLEPROVIDER_SIMPLECOMPRESSOREFFECT_H
swift::sound::sample_provider::CSimpleCompressorEffect
Compressor effect.
Definition:
simplecompressoreffect.h:21
swift::sound::sample_provider::ISampleProvider
Sample provider interface.
Definition:
sampleprovider.h:19
QObject
QTimer
QVector< float >
sampleprovider.h
swiftsoundexport.h
SWIFT_SOUND_EXPORT
#define SWIFT_SOUND_EXPORT
Export a class or function from the library.
Definition:
swiftsoundexport.h:20
Generated on Thu Nov 20 2025 23:56:13 for swift by
1.9.1