Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::AlsaAudioSlave Class Referenceabstract

#include <alsa_slave.h>

Inheritance diagram for ARDOUR::AlsaAudioSlave:
[legend]

Public Member Functions

 AlsaAudioSlave (const char *play_name, const char *capt_name, unsigned int master_rate, unsigned int master_samples_per_period, unsigned int slave_rate, unsigned int slave_samples_per_period, unsigned int periods_per_cycle)
 
virtual ~AlsaAudioSlave ()
 
bool start ()
 
void stop ()
 
void cycle_start (double, double, bool)
 
void cycle_end ()
 
uint32_t capt_chan (uint32_t chn, float *dst, uint32_t n_samples)
 
uint32_t play_chan (uint32_t chn, float *src, uint32_t n_samples)
 
bool running () const
 
void freewheel (bool)
 
int state (void) const
 
uint32_t nplay (void) const
 
uint32_t ncapt (void) const
 

Public Attributes

PBD::Signal< void()> Halted
 

Protected Member Functions

virtual void update_latencies (uint32_t, uint32_t)=0
 

Private Member Functions

void * process_thread ()
 

Static Private Member Functions

static void * _process_thread (void *)
 
static void reset_resampler (ArdourZita::VResampler &)
 

Private Attributes

Alsa_pcmi _pcmi
 
pthread_t _thread
 
bool _run
 
bool _active
 
double _t0
 
double _t1
 
uint64_t _samples_since_dll_reset
 
double _ratio
 
uint32_t _capt_latency
 
double _play_latency
 
volatile double _slave_speed
 
std::atomic< int > _draining
 
PBD::RingBuffer< float > _rb_capture
 
PBD::RingBuffer< float > _rb_playback
 
size_t _samples_per_period
 
float * _capt_buff
 
float * _play_buff
 
float * _src_buff
 
ArdourZita::VResampler _src_capt
 
ArdourZita::VResampler _src_play
 

Detailed Description

Definition at line 34 of file alsa_slave.h.

Constructor & Destructor Documentation

◆ AlsaAudioSlave()

ARDOUR::AlsaAudioSlave::AlsaAudioSlave ( const char *  play_name,
const char *  capt_name,
unsigned int  master_rate,
unsigned int  master_samples_per_period,
unsigned int  slave_rate,
unsigned int  slave_samples_per_period,
unsigned int  periods_per_cycle 
)

◆ ~AlsaAudioSlave()

virtual ARDOUR::AlsaAudioSlave::~AlsaAudioSlave ( )
virtual

Member Function Documentation

◆ _process_thread()

static void* ARDOUR::AlsaAudioSlave::_process_thread ( void *  )
staticprivate

◆ capt_chan()

uint32_t ARDOUR::AlsaAudioSlave::capt_chan ( uint32_t  chn,
float *  dst,
uint32_t  n_samples 
)

◆ cycle_end()

void ARDOUR::AlsaAudioSlave::cycle_end ( )

◆ cycle_start()

void ARDOUR::AlsaAudioSlave::cycle_start ( double  ,
double  ,
bool   
)

◆ freewheel()

void ARDOUR::AlsaAudioSlave::freewheel ( bool  )

◆ ncapt()

uint32_t ARDOUR::AlsaAudioSlave::ncapt ( void  ) const
inline

Definition at line 62 of file alsa_slave.h.

◆ nplay()

uint32_t ARDOUR::AlsaAudioSlave::nplay ( void  ) const
inline

Definition at line 61 of file alsa_slave.h.

◆ play_chan()

uint32_t ARDOUR::AlsaAudioSlave::play_chan ( uint32_t  chn,
float *  src,
uint32_t  n_samples 
)

◆ process_thread()

void* ARDOUR::AlsaAudioSlave::process_thread ( )
private

◆ reset_resampler()

static void ARDOUR::AlsaAudioSlave::reset_resampler ( ArdourZita::VResampler )
staticprivate

◆ running()

bool ARDOUR::AlsaAudioSlave::running ( ) const
inline

Definition at line 57 of file alsa_slave.h.

◆ start()

bool ARDOUR::AlsaAudioSlave::start ( )

◆ state()

int ARDOUR::AlsaAudioSlave::state ( void  ) const
inline

Definition at line 60 of file alsa_slave.h.

◆ stop()

void ARDOUR::AlsaAudioSlave::stop ( )

◆ update_latencies()

virtual void ARDOUR::AlsaAudioSlave::update_latencies ( uint32_t  ,
uint32_t   
)
protectedpure virtual

Member Data Documentation

◆ _active

bool ARDOUR::AlsaAudioSlave::_active
private

Definition at line 77 of file alsa_slave.h.

◆ _capt_buff

float* ARDOUR::AlsaAudioSlave::_capt_buff
private

Definition at line 96 of file alsa_slave.h.

◆ _capt_latency

uint32_t ARDOUR::AlsaAudioSlave::_capt_latency
private

Definition at line 84 of file alsa_slave.h.

◆ _draining

std::atomic<int> ARDOUR::AlsaAudioSlave::_draining
private

Definition at line 89 of file alsa_slave.h.

◆ _pcmi

Alsa_pcmi ARDOUR::AlsaAudioSlave::_pcmi
private

Definition at line 70 of file alsa_slave.h.

◆ _play_buff

float* ARDOUR::AlsaAudioSlave::_play_buff
private

Definition at line 97 of file alsa_slave.h.

◆ _play_latency

double ARDOUR::AlsaAudioSlave::_play_latency
private

Definition at line 85 of file alsa_slave.h.

◆ _ratio

double ARDOUR::AlsaAudioSlave::_ratio
private

Definition at line 83 of file alsa_slave.h.

◆ _rb_capture

PBD::RingBuffer<float> ARDOUR::AlsaAudioSlave::_rb_capture
private

Definition at line 91 of file alsa_slave.h.

◆ _rb_playback

PBD::RingBuffer<float> ARDOUR::AlsaAudioSlave::_rb_playback
private

Definition at line 92 of file alsa_slave.h.

◆ _run

bool ARDOUR::AlsaAudioSlave::_run
private

Definition at line 76 of file alsa_slave.h.

◆ _samples_per_period

size_t ARDOUR::AlsaAudioSlave::_samples_per_period
private

Definition at line 94 of file alsa_slave.h.

◆ _samples_since_dll_reset

uint64_t ARDOUR::AlsaAudioSlave::_samples_since_dll_reset
private

Definition at line 81 of file alsa_slave.h.

◆ _slave_speed

volatile double ARDOUR::AlsaAudioSlave::_slave_speed
private

Definition at line 87 of file alsa_slave.h.

◆ _src_buff

float* ARDOUR::AlsaAudioSlave::_src_buff
private

Definition at line 98 of file alsa_slave.h.

◆ _src_capt

ArdourZita::VResampler ARDOUR::AlsaAudioSlave::_src_capt
private

Definition at line 100 of file alsa_slave.h.

◆ _src_play

ArdourZita::VResampler ARDOUR::AlsaAudioSlave::_src_play
private

Definition at line 101 of file alsa_slave.h.

◆ _t0

double ARDOUR::AlsaAudioSlave::_t0
private

Definition at line 80 of file alsa_slave.h.

◆ _t1

double ARDOUR::AlsaAudioSlave::_t1
private

Definition at line 80 of file alsa_slave.h.

◆ _thread

pthread_t ARDOUR::AlsaAudioSlave::_thread
private

Definition at line 74 of file alsa_slave.h.

◆ Halted

PBD::Signal<void()> ARDOUR::AlsaAudioSlave::Halted

Definition at line 64 of file alsa_slave.h.


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