Allolib  1.0
C++ Components For Interactive Multimedia
al::AudioIOData Class Reference

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/io/al_AudioIOData.hpp>

Inheritance diagram for al::AudioIOData:
al::AudioIO

Public Types

enum  Backend { PORTAUDIO , RTAUDIO , DUMMY }
 

Public Member Functions

 AudioIOData (void *user=nullptr)
 Constructor.
 
bool operator() () const
 Iterate frame counter, returning true while more frames.
 
unsigned int frame () const
 Get current frame number.
 
float & bus (unsigned int chan) const
 Get bus sample at current frame iteration on specified channel.
 
float & bus (unsigned int chan, unsigned int frame) const
 Get bus sample at specified channel and frame.
 
float * busBuffer (unsigned int chan=0) const
 Get non-interleaved bus buffer on specified channel.
 
const float & in (unsigned int chan) const
 Get input sample at current frame iteration on specified channel.
 
const float & in (unsigned int chan, unsigned int frame) const
 Get input sample at specified channel and frame.
 
const float * inBuffer (unsigned int chan=0) const
 Get non-interleaved input buffer on specified channel.
 
float & out (unsigned int chan) const
 Get output sample at current frame iteration on specified channel.
 
float & out (unsigned int chan, unsigned int frame) const
 Get output sample at specified channel and frame.
 
float * outBuffer (unsigned int chan=0) const
 Get non-interleaved output buffer on specified channel.
 
void sum (float v, unsigned int chan) const
 Add value to current output sample on specified channel.
 
void sum (float v, unsigned int ch1, unsigned int ch2) const
 Add value to current output sample on specified channels.
 
float & temp (unsigned int frame) const
 Get sample from temporary buffer at specified frame.
 
float * tempBuffer () const
 Get non-interleaved temporary buffer on specified channel.
 
void * user () const
 Get pointer to user data.
 
template<class UserDataType >
UserDataType & user () const
 
int channels (bool forOutput) const
 
unsigned int channelsIn () const
 Get effective number of input channels.
 
unsigned int channelsOut () const
 Get effective number of output channels.
 
unsigned int channelsBus () const
 Get number of allocated bus channels.
 
uint64_t framesPerBuffer () const
 Get frames/buffer of audio I/O stream.
 
double framesPerSecond () const
 Get frames/second of audio I/O streams.
 
double fps () const
 
double secondsPerBuffer () const
 Get seconds/buffer of audio I/O stream.
 
void user (void *v)
 Set user data.
 
void frame (unsigned int v)
 Set frame count for next iteration.
 
void zeroBus ()
 Zeros all the bus buffers.
 
void zeroOut ()
 Zeros all the internal output buffers.
 
virtual void channels (int num, bool forOutput)
 
void channelsIn (int n)
 Set number of input channels.
 
void channelsOut (int n)
 Set number of output channels.
 
virtual void channelsBus (int num)
 Set number of bus channels.
 
virtual void framesPerSecond (double v)
 Set number of frames per second.
 
virtual void framesPerBuffer (unsigned int n)
 Set number of frames per processing buffer.
 
AudioIODatagain (float v)
 
bool usingGain () const
 

Public Attributes

float mGain
 
float mGainPrev
 

Protected Member Functions

void resizeBuffer (bool forOutput)
 

Protected Attributes

void * mUser
 
unsigned int mFrame
 
unsigned int mFramesPerBuffer
 
double mFramesPerSecond
 
float * mBufI
 
float * mBufO
 
float * mBufB
 
float * mBufT
 
unsigned int mNumI
 
unsigned int mNumO
 
unsigned int mNumB
 

Detailed Description

Audio data to be sent to callback Audio buffers are guaranteed to be stored in a contiguous non-interleaved format, i.e., frames are tightly packed per channel.

Definition at line 174 of file al_AudioIOData.hpp.

Member Function Documentation

◆ channels()

virtual void al::AudioIOData::channels ( int  num,
bool  forOutput 
)
virtual

Sets number of effective channels on input or output device depending on 'forOutput' flag. An effective channel is either a real device channel or virtual channel depending on how many channels the device supports. Passing in -1 for the number of channels opens all available channels.

Reimplemented in al::AudioIO.


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