Mixxx

EngineControl Class Reference

#include <enginecontrol.h>

Inheritance diagram for EngineControl:
Collaboration diagram for EngineControl:

List of all members.

Public Slots

virtual void trackLoaded (TrackPointer pTrack)
virtual void trackUnloaded (TrackPointer pTrack)

Signals

void seek (double fractionalPosition)
void seekAbs (double sample)

Public Member Functions

 EngineControl (const char *_group, ConfigObject< ConfigValue > *_config)
virtual ~EngineControl ()
virtual double process (const double dRate, const double dCurrentSample, const double dTotalSamples, const int iBufferSize)
virtual double nextTrigger (const double dRate, const double dCurrentSample, const double dTotalSamples, const int iBufferSize)
virtual double getTrigger (const double dRate, const double dCurrentSample, const double dTotalSamples, const int iBufferSize)
virtual void hintReader (QList< Hint > &hintList)
void setOtherEngineBuffer (EngineBuffer *pOtherEngineBuffer)
void setCurrentSample (const double dCurrentSample, const double dTotalSamples)
double getCurrentSample () const
double getTotalSamples () const
virtual void notifySeek (double dNewPlaypo)

Protected Member Functions

const char * getGroup ()
ConfigObject< ConfigValue > * getConfig ()
EngineBuffergetOtherEngineBuffer ()

Detailed Description

EngineControl is an abstract base class for objects which implement functionality pertaining to EngineBuffer. An EngineControl is meant to be a succinct implementation of a given EngineBuffer feature. Previously, EngineBuffer was an example of feature creep -- this is the result.

When writing an EngineControl class, the following two properties hold:

EngineControl::process will only be called during an EngineBuffer::process callback from the sound engine. This implies that any ControlObject accesses made in either of these methods are mutually exclusive, since one is exclusively in the call graph of the other.

Furthermore, most slots that are connected to Mixxx ControlObjects are safe to process without locking EngineBuffer/EngineControl owned values, since Mixxx only synchronizes ControlObjects in the SoundManager callback, and thus EngineBuffer::process (and correspondingly, EngineControl::process) are mutually exclusive to any ControlObject related slots that fire on an EngineControl. This is not true in every case, so when in doubt, ask a core developer.

Definition at line 39 of file enginecontrol.h.


Constructor & Destructor Documentation

EngineControl::EngineControl ( const char *  _group,
ConfigObject< ConfigValue > *  _config 
)

Definition at line 7 of file enginecontrol.cpp.

EngineControl::~EngineControl ( ) [virtual]

Definition at line 16 of file enginecontrol.cpp.


Member Function Documentation

ConfigObject< ConfigValue > * EngineControl::getConfig ( ) [protected]

Definition at line 72 of file enginecontrol.cpp.

Here is the caller graph for this function:

double EngineControl::getCurrentSample ( ) const

Definition at line 60 of file enginecontrol.cpp.

Here is the caller graph for this function:

const char * EngineControl::getGroup ( ) [protected]

Definition at line 68 of file enginecontrol.cpp.

EngineBuffer * EngineControl::getOtherEngineBuffer ( ) [protected]

Definition at line 76 of file enginecontrol.cpp.

double EngineControl::getTotalSamples ( ) const

Definition at line 64 of file enginecontrol.cpp.

double EngineControl::getTrigger ( const double  dRate,
const double  dCurrentSample,
const double  dTotalSamples,
const int  iBufferSize 
) [virtual]

Reimplemented in LoopingControl.

Definition at line 35 of file enginecontrol.cpp.

void EngineControl::hintReader ( QList< Hint > &  hintList) [virtual]

Reimplemented in CueControl, and LoopingControl.

Definition at line 48 of file enginecontrol.cpp.

double EngineControl::nextTrigger ( const double  dRate,
const double  dCurrentSample,
const double  dTotalSamples,
const int  iBufferSize 
) [virtual]

Reimplemented in LoopingControl.

Definition at line 28 of file enginecontrol.cpp.

void EngineControl::notifySeek ( double  dNewPlaypo) [virtual]

Reimplemented in LoopingControl, and RateControl.

Definition at line 80 of file enginecontrol.cpp.

Here is the caller graph for this function:

double EngineControl::process ( const double  dRate,
const double  dCurrentSample,
const double  dTotalSamples,
const int  iBufferSize 
) [virtual]

Reimplemented in ClockControl, LoopingControl, QuantizeControl, and RateControl.

Definition at line 21 of file enginecontrol.cpp.

Here is the caller graph for this function:

void EngineControl::seek ( double  fractionalPosition) [signal]
void EngineControl::seekAbs ( double  sample) [signal]

Here is the caller graph for this function:

void EngineControl::setCurrentSample ( const double  dCurrentSample,
const double  dTotalSamples 
)

Definition at line 55 of file enginecontrol.cpp.

Here is the caller graph for this function:

void EngineControl::setOtherEngineBuffer ( EngineBuffer pOtherEngineBuffer)

Definition at line 51 of file enginecontrol.cpp.

Here is the caller graph for this function:

void EngineControl::trackLoaded ( TrackPointer  pTrack) [virtual, slot]

Reimplemented in BpmControl, ClockControl, LoopingControl, QuantizeControl, and VinylControlControl.

Definition at line 42 of file enginecontrol.cpp.

void EngineControl::trackUnloaded ( TrackPointer  pTrack) [virtual, slot]

Reimplemented in BpmControl, ClockControl, LoopingControl, QuantizeControl, and VinylControlControl.

Definition at line 45 of file enginecontrol.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines