AudioBus Class Reference

List of all members.

Public Slots

void resize_buffer ()

Signals

void monitoringPeaksStarted ()
void monitoringPeaksStopped ()

Public Member Functions

 AudioBus (const QString &name)
 AudioBus (const QString &name, int channelCount)
void add_channel (AudioChannel *chan)
int get_channel_count ()
QString get_name ()
AudioChannelget_channel (int channelNumber)
audio_sample_t * get_buffer (int channel, nframes_t nframes)
void set_buffer_size (nframes_t size)
void set_monitor_peaks (bool monitor)
void reset_monitor_peaks ()
bool is_monitoring_peaks () const
void monitor_peaks ()
void silence_buffers (nframes_t nframes)


Detailed Description

A convenience class to wrap (the likley 2) AudioChannels in the well known Bus concept.

Constructor & Destructor Documentation

AudioBus::AudioBus ( const QString &  name  ) 

Constructs an AudioBus instance with name name

Parameters:
name The name of the AudioBus
Returns:
a new AudioBus instance

AudioBus::AudioBus ( const QString &  name,
int  channels 
)

Constructs an AudioBus instance with name name and channel channels

This is a convenience constructor, which populates the AudioBus with channels AudioChannels The buffer size of the AudioChannels is the same as the current AudioDevice::get_buffer_size()

Parameters:
name The name of the AudioBus
channels The number of AudioChannels to add to this AudioBus
Returns:
a new AudioBus instance

References add_channel(), and AudioChannel::set_buffer_size().


Member Function Documentation

void AudioBus::add_channel ( AudioChannel chan  ) 

Add's AudioChannel chan to this AudioBus channel list

This function is used by the AudioDrivers, use the convenience constructor AudioBus( QString name, int channels ) if you want to quickly create an AudioBus with a certain amount of AudioChannels!

Parameters:
chan The AudioChannel to add.

Referenced by AudioBus().

AudioChannel * AudioBus::get_channel ( int  channelNumber  )  [inline]

Get the AudioChannel associated with channelNumber

Parameters:
channelNumber The channelNumber associated with this AudioBus's AudioChannel
Returns:
The AudioChannel on succes, 0 on failure

audio_sample_t* AudioBus::get_buffer ( int  channel,
nframes_t  nframes 
) [inline]

Get a pointer to the buffer associated with AudioChannel channel

Parameters:
channel The channel number to get the buffer from
nframes The buffer size to get
Returns:

void AudioBus::set_buffer_size ( nframes_t  size  ) 

Resizes all the AudioChannel buffers to the new size.

WARNING: This is not thread save!

Parameters:
size The new buffer size

void AudioBus::set_monitor_peaks ( bool  monitor  ) 

If set to true, all the data going through the AudioChannels in this AudioBus will be monitored for their highest peak value. Get the peak value with AudioChannel::get_peak_value()

Parameters:
monitor 

void AudioBus::silence_buffers ( nframes_t  nframes  )  [inline]

Zero all AudioChannels buffers for

Parameters:
nframes size of the buffer


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

Generated on Sun Mar 8 12:44:05 2009 for traverso by  doxygen 1.5.5