TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Dithering Class Reference

#include <dithering_p.h>

+ Inheritance diagram for Dithering:

Classes

struct  AudioDither
 

Public Member Functions

 Dithering ()
 
virtual void configure (quint32 srate, ChannelMap map) overridefinal
 
virtual void applyEffect (Buffer *b) overridefinal
 
void setFormats (Qmmp::AudioFormat in, Qmmp::AudioFormat out)
 
void setEnabled (bool enabled)
 
- Public Member Functions inherited from Effect
 Effect ()=default
 
virtual ~Effect ()=default
 
quint32 sampleRate () const
 
int channels () const
 
const ChannelMap & channelMap () const
 
AudioParameters audioParameters () const
 
EffectFactory * factory () const
 

Private Member Functions

void clearHistory ()
 
quint32 prng (quint32 state)
 
float audioLinearDither (float sample, AudioDither *dither)
 

Private Attributes

int m_chan = 2
 
AudioDither m_dither [9]
 
float m_lsb = 0.0f
 
bool m_required = false
 
bool m_enabled
 

Additional Inherited Members

- Static Public Member Functions inherited from Effect
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)
 

Detailed Description

Definition at line 31 of file dithering_p.h.

Constructor & Destructor Documentation

Dithering::Dithering ( )

Member Function Documentation

virtual void Dithering::applyEffect ( Buffer *  b)
finaloverridevirtual

Adds audio effect to the buffer b. Subclass should implement this function.

Implements Effect.

float Dithering::audioLinearDither ( float  sample,
AudioDither *  dither 
)
private
void Dithering::clearHistory ( )
private
virtual void Dithering::configure ( quint32  srate,
ChannelMap  map 
)
finaloverridevirtual

Prepares object for usage. Subclasses that reimplement this function must call the base implementation.

Parameters
srateSample rate.
mapMap of channels.

Reimplemented from Effect.

quint32 Dithering::prng ( quint32  state)
private
void Dithering::setEnabled ( bool  enabled)
void Dithering::setFormats ( Qmmp::AudioFormat  in,
Qmmp::AudioFormat  out 
)

Member Data Documentation

int Dithering::m_chan = 2
private

Definition at line 44 of file dithering_p.h.

AudioDither Dithering::m_dither[9]
private

Definition at line 52 of file dithering_p.h.

bool Dithering::m_enabled
private

Definition at line 54 of file dithering_p.h.

float Dithering::m_lsb = 0.0f
private

Definition at line 53 of file dithering_p.h.

bool Dithering::m_required = false
private

Definition at line 54 of file dithering_p.h.


The documentation for this class was generated from the following file: