AuLib  1.0beta
Public Member Functions | Protected Attributes | List of all members
AuLib::SigBus Class Reference

#include <AuLib/SigBus.h>

Inheritance diagram for AuLib::SigBus:
Inheritance graph
[legend]
Collaboration diagram for AuLib::SigBus:
Collaboration graph
[legend]

Public Member Functions

 SigBus (double scal=1., double offs=0., bool overwrite=false, uint32_t nchnls=def_nchnls, uint32_t vframes=def_vframes)
 
const double * process (const double *sig)
 
const SigBusprocess (const double *sig, double scal, double offs=0., bool overwrite=true)
 
const SigBusprocess (const AudioBase &obj)
 
const SigBusprocess (const AudioBase &obj, double scal, double offs=0., bool overwrite=true)
 
const SigBusoperator() (const AudioBase &obj)
 
const SigBusoperator() (const AudioBase &obj, double scal, double offs=0., bool overwrite=true)
 
void clear ()
 
- Public Member Functions inherited from AuLib::AudioBase
 AudioBase (uint32_t nchnls=def_nchnls, uint32_t vframes=def_vframes, double sr=def_sr)
 
virtual const AudioBaseoperator*= (double scal)
 
virtual const AudioBaseoperator*= (const double *sig)
 
virtual const AudioBaseoperator*= (const AudioBase &obj)
 
virtual const AudioBaseoperator+= (double offs)
 
virtual const AudioBaseoperator+= (const double *sig)
 
virtual const AudioBaseoperator+= (const AudioBase &obj)
 
double & operator[] (uint32_t ndx)
 
const double & operator[] (uint32_t ndx) const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const AudioBaseset (const AudioBase &obj)
 
const AudioBaseset (const double *sig)
 
const double * set (double v)
 
double set (double v, uint32_t p)
 
 operator const std::vector< double > & () const
 
 operator const double * () const
 
const double * vector () const
 
double vector (uint32_t frndx, uint32_t chn) const
 
uint32_t vframes (uint32_t frames)
 
uint32_t resize_exact (uint32_t frames)
 
uint32_t vframes () const
 
uint32_t vsamps () const
 
uint32_t nchnls () const
 
uint32_t sr () const
 
uint32_t error () const
 
virtual const char * error_message () const
 

Protected Attributes

double m_scal
 
double m_offs
 
bool m_ovw
 
- Protected Attributes inherited from AuLib::AudioBase
uint32_t m_nchnls
 
uint32_t m_vframes
 
std::vector< double > m_vector
 
double m_sr
 
uint32_t m_error
 

Additional Inherited Members

- Public Types inherited from AuLib::AudioBase
typedef std::vector< double >::iterator iterator
 
typedef std::vector< double >::const_iterator const_iterator
 

Detailed Description

A signal bus with optional scaling, offset and overwriting

Constructor & Destructor Documentation

◆ SigBus()

AuLib::SigBus::SigBus ( double  scal = 1.,
double  offs = 0.,
bool  overwrite = false,
uint32_t  nchnls = def_nchnls,
uint32_t  vframes = def_vframes 
)
inline

SigBus constructor

scal - amplitude scaling
offs - amplitude offset
overwrite - overwrite bus
nchnls - number of channels
vframes - vector size

Member Function Documentation

◆ clear()

void AuLib::SigBus::clear ( )
inline

Clears the vector vector

◆ operator()() [1/2]

const SigBus& AuLib::SigBus::operator() ( const AudioBase obj)
inline

operator (a) convenience method

◆ operator()() [2/2]

const SigBus& AuLib::SigBus::operator() ( const AudioBase obj,
double  scal,
double  offs = 0.,
bool  overwrite = true 
)
inline

operator (a,b,c,d) convenience method

◆ process() [1/4]

const double* AuLib::SigBus::process ( const double *  sig)
inline

Adds a signal vector to the bus. Requires an explicit call to clear() if overwrite is switched off once the bus data has been consumed

◆ process() [2/4]

const SigBus& AuLib::SigBus::process ( const double *  sig,
double  scal,
double  offs = 0.,
bool  overwrite = true 
)
inline

Applies a gain scaling and optional offset to a signal vector. If overwrite is true, the vector vector is overwritten and a call to clear() is not required.

◆ process() [3/4]

const SigBus& AuLib::SigBus::process ( const AudioBase obj)
inline

Adds a signal vector to the bus from obj. Requires an explicit call to clear() once the bus data has been consumed

◆ process() [4/4]

const SigBus& AuLib::SigBus::process ( const AudioBase obj,
double  scal,
double  offs = 0.,
bool  overwrite = true 
)
inline

Applies a gain scaling and optional offset to a signal vector from obj. If overwrite is true, the vector vector is overwritten and a call to clear() is not required.

Member Data Documentation

◆ m_offs

double AuLib::SigBus::m_offs
protected

◆ m_ovw

bool AuLib::SigBus::m_ovw
protected

◆ m_scal

double AuLib::SigBus::m_scal
protected

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