AuLib  1.0beta
Public Member Functions | Friends | List of all members
AuLib::SoundOut Class Referencefinal

#include <AuLib/SoundOut.h>

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

Public Member Functions

 SoundOut (const char *dest, uint32_t nchnls=def_nchnls, uint32_t vframes=def_bframes, double sr=def_sr)
 
 ~SoundOut ()
 
uint64_t write (const double *sig, uint32_t samples)
 
uint64_t write (const AudioBase &obj)
 
uint64_t write (uint32_t chn, const AudioBase &obj)
 
double time () const
 
uint64_t timestamp () const
 
const char * dest () const
 
virtual const char * error_message () const
 
uint64_t operator() (const AudioBase &obj)
 
uint64_t operator() (uint32_t chn, const AudioBase &obj)
 
 SoundOut (const char *dest, uint32_t nchnls=def_nchnls, uint32_t vframes=def_bframes, double sr=def_sr)
 
 ~SoundOut ()
 
uint64_t write (const double *sig, uint32_t frames=def_vframes)
 
uint64_t write (const AudioBase &obj)
 
double time () const
 
const char * dest () const
 
virtual const char * error_message () const
 
uint64_t operator() (const AudioBase &obj)
 
- 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
 

Friends

int rt_audio (const float *input, float *output, unsigned long frameCount, const void *timeInfo, unsigned long statusFlags, SoundOut *userData)
 
void audio (SoundOut &obj)
 
int rt_audio (const float *input, float *output, unsigned long frameCount, const void *timeInfo, unsigned long statusFlags, SoundOut *userData)
 
void audio (AuLib::SoundOut &obj)
 

Additional Inherited Members

- Public Types inherited from AuLib::AudioBase
typedef std::vector< double >::iterator iterator
 
typedef std::vector< double >::const_iterator const_iterator
 
- 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
 

Detailed Description

Audio output class

Constructor & Destructor Documentation

◆ SoundOut() [1/2]

AuLib::SoundOut::SoundOut ( const char *  dest,
uint32_t  nchnls = def_nchnls,
uint32_t  vframes = def_bframes,
double  sr = def_sr 
)

SoundOut constructor

dest - vector destination ("dac", "stdout", or file path)
nchnls - number of channels
sr - sampling rate
vframes - vector size

◆ ~SoundOut() [1/2]

AuLib::SoundOut::~SoundOut ( )

SoundOut destructor

◆ SoundOut() [2/2]

AuLib::SoundOut::SoundOut ( const char *  dest,
uint32_t  nchnls = def_nchnls,
uint32_t  vframes = def_bframes,
double  sr = def_sr 
)

SoundOut constructor

dest - vector destination ("dac", "stdout", or file path)
nchnls - number of channels
sr - sampling rate
vframes - vector size

◆ ~SoundOut() [2/2]

AuLib::SoundOut::~SoundOut ( )

SoundOut destructor

Member Function Documentation

◆ dest() [1/2]

const char* AuLib::SoundOut::dest ( ) const
inline

Get the destination name

◆ dest() [2/2]

const char* AuLib::SoundOut::dest ( ) const
inline

Get the destination name

◆ error_message() [1/2]

virtual const char* AuLib::SoundOut::error_message ( ) const
inlinevirtual

Get error message

Reimplemented from AuLib::AudioBase.

◆ error_message() [2/2]

virtual const char* AuLib::SoundOut::error_message ( ) const
inlinevirtual

Get error message

Reimplemented from AuLib::AudioBase.

◆ operator()() [1/3]

uint64_t AuLib::SoundOut::operator() ( const AudioBase obj)
inline

operator() overload convenience method

◆ operator()() [2/3]

uint64_t AuLib::SoundOut::operator() ( const AudioBase obj)
inline

operator() overload convenience method

◆ operator()() [3/3]

uint64_t AuLib::SoundOut::operator() ( uint32_t  chn,
const AudioBase obj 
)
inline

operator() overload convenience method

◆ time() [1/2]

double AuLib::SoundOut::time ( ) const
inline

Get the current vector stream time

◆ time() [2/2]

double AuLib::SoundOut::time ( ) const
inline

Get the current output stream time

◆ timestamp()

uint64_t AuLib::SoundOut::timestamp ( ) const
inline

Get the current output stream time in frames

◆ write() [1/5]

uint64_t AuLib::SoundOut::write ( const double *  sig,
uint32_t  frames = def_vframes 
)

Writes sig to the vector destination, returning the vector current framecount.

◆ write() [2/5]

uint64_t AuLib::SoundOut::write ( const double *  sig,
uint32_t  samples 
)
inline

Writes sig containing samples to the vector destination, returning the vector current framecount.

◆ write() [3/5]

uint64_t AuLib::SoundOut::write ( const AudioBase obj)
inline

Writes the audio vector in obj to the vector destination, returning the vector current framecount.

◆ write() [4/5]

uint64_t AuLib::SoundOut::write ( const AudioBase obj)
inline

Writes the audio vector in obj to the vector destination, returning the vector current framecount.

◆ write() [5/5]

uint64_t AuLib::SoundOut::write ( uint32_t  chn,
const AudioBase obj 
)
inline

Writes the audio vector in obj to chn of destination, returning the vector current framecount.

Friends And Related Function Documentation

◆ audio [1/2]

void audio ( AuLib::SoundOut obj)
friend

◆ audio [2/2]

void audio ( SoundOut obj)
friend

◆ rt_audio [1/2]

int rt_audio ( const float *  input,
float *  output,
unsigned long  frameCount,
const void *  timeInfo,
unsigned long  statusFlags,
SoundOut userData 
)
friend

◆ rt_audio [2/2]

int rt_audio ( const float *  input,
float *  output,
unsigned long  frameCount,
const void *  timeInfo,
unsigned long  statusFlags,
SoundOut userData 
)
friend

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