Version 4.3.0

This commit is contained in:
Gary Scavone
2009-03-24 23:02:15 -04:00
committed by Stephen Sinclair
parent 2cbce2d8bd
commit 27d9b79dc7
271 changed files with 22219 additions and 8834 deletions

View File

@@ -3,10 +3,10 @@
\brief STK realtime audio (blocking) output class.
This class provides a simplified interface to RtAudio for realtime
audio output. It is a subclass of WvOut. Because this class
makes use of RtAudio's blocking output routines, its performance
is less robust on systems where the audio API is callback-based
(Macintosh CoreAudio and Windows ASIO).
audio output. It is a subclass of WvOut. This class makes use of
RtAudio's callback functionality by creating a large ring-buffer
into which data is written. This class should not be used when
low-latency is desired.
RtWvOut supports multi-channel data in interleaved format. It is
important to distinguish the tick() methods, which output single
@@ -14,7 +14,7 @@
method, which take a pointer or reference to multi-channel sample
frame data.
by Perry R. Cook and Gary P. Scavone, 1995 - 2005.
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
*/
/***************************************************/
@@ -32,8 +32,7 @@ class RtWvOut : public WvOut
/*!
The \e device argument is passed to RtAudio during
instantiation. The default value (zero) will select the default
device on your system or the first device found meeting the
specified parameters. On systems with multiple
device on your system. On systems with multiple
soundcards/devices, values greater than zero can be specified in
accordance with the order that the devices are enumerated by the
underlying audio API. The default buffer size of RT_BUFFER_SIZE
@@ -41,7 +40,7 @@ class RtWvOut : public WvOut
occurs duing instantiation.
*/
RtWvOut( unsigned int nChannels = 1, StkFloat sampleRate = Stk::sampleRate(),
int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 4 );
int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 20 );
//! Class destructor.
~RtWvOut();
@@ -51,30 +50,30 @@ class RtWvOut : public WvOut
The stream is started automatically, if necessary, when a
tick() or tickFrame method is called.
*/
void start(void);
void start( void );
//! Stop the audio output stream.
/*!
It may be necessary to use this method to avoid undesireable
audio buffer cycling if you wish to temporarily stop audio output.
*/
void stop(void);
void stop( void );
// This function is not intended for general use but had to be made
// public for access from the audio callback function.
int readBuffer( void *buffer, unsigned int frameCount );
protected:
void computeSample( const StkFloat sample );
void computeFrames( const StkFrames& frames );
void incrementFrame( void );
RtAudio *dac_;
StkFloat *buffer_;
RtAudio dac_;
bool stopped_;
unsigned int nChannels_;
unsigned int bufferIndex_;
unsigned int iBuffer_;
unsigned int bufferFrames_;
unsigned int readIndex_;
unsigned int writeIndex_;
long framesFilled_;
unsigned int status_; // running = 0, emptying buffer = 1, finished = 2
};