LMMS
Loading...
Searching...
No Matches
lmms::AudioBusHandle Class Reference

Job between PlayHandle and MixerChannel. More...

#include <AudioBusHandle.h>

Inheritance diagram for lmms::AudioBusHandle:
lmms::ThreadableJob

Public Member Functions

 AudioBusHandle (const QString &name, bool hasEffectChain=true, FloatModel *volumeModel=nullptr, FloatModel *panningModel=nullptr, BoolModel *mutedModel=nullptr)
virtual ~AudioBusHandle ()
bool extOutputEnabled () const
void setExtOutputEnabled (bool enabled)
mix_ch_t nextMixerChannel () const
void setNextMixerChannel (const mix_ch_t chnl)
const QString & name () const
void setName (const QString &newName)
EffectChaineffects ()
bool processEffects ()
void doProcessing () override
bool requiresProcessing () const override
void addPlayHandle (PlayHandle *handle)
void removePlayHandle (PlayHandle *handle)
Public Member Functions inherited from lmms::ThreadableJob
 ThreadableJob ()
ProcessingState state () const
void reset ()
void queue ()
void done ()
void process ()

Private Attributes

volatile bool m_bufferUsage
AudioBuffer m_buffer
bool m_extOutputEnabled
mix_ch_t m_nextMixerChannel
QString m_name
std::unique_ptr< EffectChainm_effects
PlayHandleList m_playHandles
QMutex m_playHandleLock
FloatModelm_volumeModel
FloatModelm_panningModel
BoolModelm_mutedModel

Friends

class AudioEngine
class AudioEngineWorkerThread

Additional Inherited Members

Public Types inherited from lmms::ThreadableJob
enum class  ProcessingState : int { Unstarted , Queued , InProgress , Done }
Protected Attributes inherited from lmms::ThreadableJob
std::atomic< ProcessingStatem_state

Detailed Description

Job between PlayHandle and MixerChannel.

A ThreadableJob class located at the exit point of each PlayHandle into a MixerChannel (or into an audio device, in case of AudioJack, but this is not supported in AudioBusHandle yet). It contains an optional EffectChain which is e.g. visualized in the InstrumentTrackWindow or SampleTrackWindow. For processing, it adds all input play handles into an internal buffer, processes the EffectChain (if existing) on that buffer and finally merges the buffer into its MixerChannel.

Constructor & Destructor Documentation

◆ AudioBusHandle()

lmms::AudioBusHandle::AudioBusHandle ( const QString & name,
bool hasEffectChain = true,
FloatModel * volumeModel = nullptr,
FloatModel * panningModel = nullptr,
BoolModel * mutedModel = nullptr )

◆ ~AudioBusHandle()

lmms::AudioBusHandle::~AudioBusHandle ( )
virtual

Member Function Documentation

◆ addPlayHandle()

void lmms::AudioBusHandle::addPlayHandle ( PlayHandle * handle)

◆ doProcessing()

void lmms::AudioBusHandle::doProcessing ( )
overridevirtual

Implements lmms::ThreadableJob.

◆ effects()

EffectChain * lmms::AudioBusHandle::effects ( )
inline

◆ extOutputEnabled()

bool lmms::AudioBusHandle::extOutputEnabled ( ) const
inline

◆ name()

const QString & lmms::AudioBusHandle::name ( ) const
inline

◆ nextMixerChannel()

mix_ch_t lmms::AudioBusHandle::nextMixerChannel ( ) const
inline

◆ processEffects()

bool lmms::AudioBusHandle::processEffects ( )

◆ removePlayHandle()

void lmms::AudioBusHandle::removePlayHandle ( PlayHandle * handle)

◆ requiresProcessing()

bool lmms::AudioBusHandle::requiresProcessing ( ) const
inlineoverridevirtual

Implements lmms::ThreadableJob.

◆ setExtOutputEnabled()

void lmms::AudioBusHandle::setExtOutputEnabled ( bool enabled)

◆ setName()

void lmms::AudioBusHandle::setName ( const QString & newName)

◆ setNextMixerChannel()

void lmms::AudioBusHandle::setNextMixerChannel ( const mix_ch_t chnl)
inline

◆ AudioEngine

friend class AudioEngine
friend

◆ AudioEngineWorkerThread

friend class AudioEngineWorkerThread
friend

Member Data Documentation

◆ m_buffer

AudioBuffer lmms::AudioBusHandle::m_buffer
private

◆ m_bufferUsage

volatile bool lmms::AudioBusHandle::m_bufferUsage
private

◆ m_effects

std::unique_ptr<EffectChain> lmms::AudioBusHandle::m_effects
private

◆ m_extOutputEnabled

bool lmms::AudioBusHandle::m_extOutputEnabled
private

◆ m_mutedModel

BoolModel* lmms::AudioBusHandle::m_mutedModel
private

◆ m_name

QString lmms::AudioBusHandle::m_name
private

◆ m_nextMixerChannel

mix_ch_t lmms::AudioBusHandle::m_nextMixerChannel
private

◆ m_panningModel

FloatModel* lmms::AudioBusHandle::m_panningModel
private

◆ m_playHandleLock

QMutex lmms::AudioBusHandle::m_playHandleLock
private

◆ m_playHandles

PlayHandleList lmms::AudioBusHandle::m_playHandles
private

◆ m_volumeModel

FloatModel* lmms::AudioBusHandle::m_volumeModel
private

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