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 "sound/dsp/SimpleComp.h"
13
#include "
sound/sampleprovider/sampleprovider.h
"
14
#include "
sound/swiftsoundexport.h
"
15
16
namespace
swift::sound::sample_provider
17
{
19
class
SWIFT_SOUND_EXPORT
CSimpleCompressorEffect
:
public
ISampleProvider
20
{
21
Q_OBJECT
22
23
public
:
25
CSimpleCompressorEffect
(
ISampleProvider
*source,
QObject
*parent =
nullptr
);
26
28
virtual
int
readSamples(
QVector<float>
&samples, qint64 count)
override
;
29
31
void
setEnabled(
bool
enabled);
32
34
void
setMakeUpGain(
double
gain);
35
37
void
setChannels(
int
channels);
38
39
private
:
40
QTimer
*m_timer =
nullptr
;
41
ISampleProvider
*m_sourceStream =
nullptr
;
42
bool
m_enabled =
true
;
43
int
m_channels = 1;
44
chunkware_simple::SimpleComp
m_simpleCompressor;
45
};
46
}
// namespace swift::sound::sample_provider
47
48
#endif
// SWIFT_SOUND_SAMPLEPROVIDER_SIMPLECOMPRESSOREFFECT_H
chunkware_simple::SimpleComp
simple compressor
Definition:
SimpleComp.h:41
swift::sound::sample_provider::CSimpleCompressorEffect
Compressor effect.
Definition:
simplecompressoreffect.h:20
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 Wed Sep 3 2025 21:41:22 for swift by
1.9.1