|
TTKMusicPlayer
4.2.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The Effect class provides the base interface class of audio effects. More...
#include <effect.h>
Inheritance diagram for Effect:Public Member Functions | |
| Effect ()=default | |
| virtual | ~Effect ()=default |
| virtual void | applyEffect (Buffer *b)=0 |
| virtual void | configure (quint32 srate, ChannelMap map) |
| quint32 | sampleRate () const |
| int | channels () const |
| const ChannelMap & | channelMap () const |
| AudioParameters | audioParameters () const |
| EffectFactory * | factory () const |
Static Public Member Functions | |
| static Effect * | create (EffectFactory *factory) |
| static QList< EffectFactory * > | factories () |
| static QList< EffectFactory * > | enabledFactories () |
| static QString | file (const EffectFactory *factory) |
| static void | setEnabled (EffectFactory *factory, bool enable=true) |
| static bool | isEnabled (const EffectFactory *factory) |
| static EffectFactory * | findFactory (const QString &shortName) |
Static Private Member Functions | |
| static void | loadPlugins () |
Private Attributes | |
| EffectFactory * | m_factory = nullptr |
| quint32 | m_freq = 0 |
| int | m_channels = 0 |
| ChannelMap | m_chan_map |
Static Private Attributes | |
| static QList< QmmpPluginCache * > * | m_cache |
| static QStringList | m_enabledNames |
The Effect class provides the base interface class of audio effects.
|
default |
Object contsructor.
|
virtualdefault |
Destructor.
|
pure virtual |
Adds audio effect to the buffer b. Subclass should implement this function.
Implemented in Dithering, ChannelConverter, and ReplayGain.
| AudioParameters Effect::audioParameters | ( | ) | const |
Returns audio parameters for output data.
| const ChannelMap& Effect::channelMap | ( | ) | const |
Returns map of channels
| int Effect::channels | ( | ) | const |
Returns channels number.
|
virtual |
Prepares object for usage. Subclasses that reimplement this function must call the base implementation.
| srate | Sample rate. |
| map | Map of channels. |
Reimplemented in Dithering, and ChannelConverter.
|
static |
Creates effect object from factory. Returns effect objects if factory is enabled, otherwise returns 0.
|
static |
Returns a list of enabled effect factories.
|
static |
Returns a list of effect factories.
Referenced by TTK::TTKQmmp::effectPlugins(), TTK::TTKQmmp::enabledEffectPlugin(), MusicQmmpPluginWidget::loadPluginsInfo(), and TTK::TTKQmmp::showEffectSetting().
| EffectFactory* Effect::factory | ( | ) | const |
Returns assigned factory object.
|
static |
Returns plugin file path.
| factory | Effect plugin factory. |
Referenced by MusicQmmpPluginWidget::loadPluginsInfo().
|
static |
Finds effect factory object by short name shortName. Returns effect factory pointer. If no match is found, 0 is returned. The search is case sensitive.
|
static |
Returns true if input plugin is enabled, otherwise returns false
| factory | Effect plugin factory. |
Referenced by MusicQmmpPluginItem::MusicQmmpPluginItem().
|
staticprivate |
| quint32 Effect::sampleRate | ( | ) | const |
Returns samplerate.
|
static |
Sets whether the effect plugin is enabled.
| factory | Effect plugin factory. |
| enable | Plugin enable state (true - enable, false - disable) |
Referenced by TTK::TTKQmmp::enabledEffectPlugin().
|
staticprivate |
|
private |
|
private |
1.8.8