svapp  1.9
AudioJACKTarget Class Reference

#include <AudioJACKTarget.h>

Inheritance diagram for AudioJACKTarget:
Collaboration diagram for AudioJACKTarget:

List of all members.

Public Slots

virtual void sourceModelReplaced ()
 The main source model (providing the playback sample rate) has been changed.
virtual void setOutputGain (float gain)
 Set the playback gain (0.0 = silence, 1.0 = levels unmodified)

Public Member Functions

 AudioJACKTarget (AudioCallbackPlaySource *source)
virtual ~AudioJACKTarget ()
virtual void shutdown ()
virtual bool isOK () const
virtual double getCurrentTime () const
float getOutputGain () const

Protected Member Functions

int process (jack_nframes_t nframes)
int xrun ()

Static Protected Member Functions

static int processStatic (jack_nframes_t, void *)
static int xrunStatic (void *)

Protected Attributes

jack_client_t * m_client
std::vector< jack_port_t * > m_outputs
jack_nframes_t m_bufferSize
jack_nframes_t m_sampleRate
QMutex m_mutex
bool m_done
AudioCallbackPlaySourcem_source
float m_outputGain

Detailed Description

Definition at line 30 of file AudioJACKTarget.h.


Constructor & Destructor Documentation


Member Function Documentation

void AudioJACKTarget::shutdown ( ) [virtual]

Implements AudioCallbackPlayTarget.

Definition at line 308 of file AudioJACKTarget.cpp.

References m_done.

Referenced by ~AudioJACKTarget().

bool AudioJACKTarget::isOK ( ) const [virtual]

Implements AudioCallbackPlayTarget.

Definition at line 314 of file AudioJACKTarget.cpp.

References m_client.

double AudioJACKTarget::getCurrentTime ( ) const [virtual]

Implements AudioCallbackPlayTarget.

Definition at line 320 of file AudioJACKTarget.cpp.

References m_client, and m_sampleRate.

void AudioJACKTarget::sourceModelReplaced ( ) [virtual, slot]

The main source model (providing the playback sample rate) has been changed.

The target should query the source's sample rate, set its output sample rate accordingly, and call back on the source's setTargetSampleRate to indicate what sample rate it succeeded in setting at the output. If this differs from the model rate, the source will resample.

Implements AudioCallbackPlayTarget.

Definition at line 342 of file AudioJACKTarget.cpp.

References AudioCallbackPlaySource::getSourceChannelCount(), m_bufferSize, m_client, m_mutex, m_outputs, m_sampleRate, AudioCallbackPlayTarget::m_source, AudioCallbackPlaySource::setTarget(), AudioCallbackPlaySource::setTargetPlayLatency(), and AudioCallbackPlaySource::setTargetSampleRate().

Referenced by AudioJACKTarget().

int AudioJACKTarget::processStatic ( jack_nframes_t  nframes,
void *  arg 
) [static, protected]

Definition at line 330 of file AudioJACKTarget.cpp.

Referenced by AudioJACKTarget().

int AudioJACKTarget::xrunStatic ( void *  arg) [static, protected]

Definition at line 336 of file AudioJACKTarget.cpp.

Referenced by AudioJACKTarget().

float AudioCallbackPlayTarget::getOutputGain ( ) const [inline, inherited]

Definition at line 37 of file AudioCallbackPlayTarget.h.

References AudioCallbackPlayTarget::m_outputGain.

void AudioCallbackPlayTarget::setOutputGain ( float  gain) [virtual, slot, inherited]

Set the playback gain (0.0 = silence, 1.0 = levels unmodified)

Definition at line 36 of file AudioCallbackPlayTarget.cpp.

References AudioCallbackPlayTarget::m_outputGain.


Member Data Documentation

jack_client_t* AudioJACKTarget::m_client [protected]
std::vector<jack_port_t *> AudioJACKTarget::m_outputs [protected]

Definition at line 55 of file AudioJACKTarget.h.

Referenced by process(), sourceModelReplaced(), and ~AudioJACKTarget().

jack_nframes_t AudioJACKTarget::m_bufferSize [protected]

Definition at line 56 of file AudioJACKTarget.h.

Referenced by AudioJACKTarget(), process(), sourceModelReplaced(), and ~AudioJACKTarget().

jack_nframes_t AudioJACKTarget::m_sampleRate [protected]

Definition at line 57 of file AudioJACKTarget.h.

Referenced by AudioJACKTarget(), getCurrentTime(), and sourceModelReplaced().

QMutex AudioJACKTarget::m_mutex [protected]

Definition at line 58 of file AudioJACKTarget.h.

Referenced by process(), and sourceModelReplaced().

bool AudioJACKTarget::m_done [protected]

Definition at line 59 of file AudioJACKTarget.h.

Referenced by process(), and shutdown().


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