From: Gary Scavone Date: Thu, 10 Oct 2013 22:03:27 +0000 (+0200) Subject: Release 3.0.1 tarball X-Git-Tag: 3.0.1 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=424e5aef32dae9c3fa92f2e5f9e86c104242bf13;p=rtaudio.git Release 3.0.1 tarball --- diff --git a/doc/html/RtAudio_8h-source.html b/doc/html/RtAudio_8h-source.html index 7c78353..0e91b8d 100644 --- a/doc/html/RtAudio_8h-source.html +++ b/doc/html/RtAudio_8h-source.html @@ -11,7 +11,7 @@

RtAudio.h

00001 /************************************************************************/
 00038 /************************************************************************/
 00039 
-00040 // RtAudio: Version 3.0, 11 March 2004
+00040 // RtAudio: Version 3.0.1, 22 March 2004
 00041 
 00042 #ifndef __RTAUDIO_H
 00043 #define __RTAUDIO_H
@@ -157,378 +157,377 @@
 00186 
 00187     RtApiStream()
 00188       :apiHandle(0), userBuffer(0), deviceBuffer(0) {}
-00189     //      :apiHandle(0), mode(UNINITIALIZED), state(STREAM_STOPPED),
-00190     //       userBuffer(0), deviceBuffer(0) {}
-00191   };
-00192 
-00193   // A protected device structure for audio devices.
-00194   struct RtApiDevice {
-00195     std::string name;      
-00196     bool probed;           
-00197     void *apiDeviceId;     // void pointer for API specific device information
-00198     int maxOutputChannels; 
-00199     int maxInputChannels;  
-00200     int maxDuplexChannels; 
-00201     int minOutputChannels; 
-00202     int minInputChannels;  
-00203     int minDuplexChannels; 
-00204     bool hasDuplexSupport; 
-00205     bool isDefault;        
-00206     std::vector<int> sampleRates; 
-00207     RtAudioFormat nativeFormats;  
-00209     // Default constructor.
-00210     RtApiDevice()
-00211       :probed(false), apiDeviceId(0), maxOutputChannels(0), maxInputChannels(0),
-00212        maxDuplexChannels(0), minOutputChannels(0), minInputChannels(0),
-00213        minDuplexChannels(0), isDefault(false), nativeFormats(0) {}
-00214   };
-00215 
-00216   typedef signed short Int16;
-00217   typedef signed int Int32;
-00218   typedef float Float32;
-00219   typedef double Float64;
-00220 
-00221   char message_[256];
-00222   int nDevices_;
-00223   std::vector<RtApiDevice> devices_;
-00224   RtApiStream stream_;
-00225 
-00230   virtual void initialize(void) = 0;
-00231 
-00240   virtual void probeDeviceInfo( RtApiDevice *info );
-00241 
-00250   virtual bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00251                                 int sampleRate, RtAudioFormat format,
-00252                                 int *bufferSize, int numberOfBuffers );
-00253 
-00258   virtual int getDefaultInputDevice(void);
-00259 
-00264   virtual int getDefaultOutputDevice(void);
-00265 
-00267   void clearDeviceInfo( RtApiDevice *info );
-00268 
-00270   void clearStreamInfo();
-00271 
-00273   void error( RtError::Type type );
-00274 
-00279   void verifyStream();
-00280 
-00285   void convertStreamBuffer( StreamMode mode );
-00286 
-00288   void byteSwapBuffer( char *buffer, int samples, RtAudioFormat format );
-00289 
-00291   int formatBytes( RtAudioFormat format );
-00292 };
+00189     //      mode(UNINITIALIZED), state(STREAM_STOPPED),
+00190   };
+00191 
+00192   // A protected device structure for audio devices.
+00193   struct RtApiDevice {
+00194     std::string name;      
+00195     bool probed;           
+00196     void *apiDeviceId;     // void pointer for API specific device information
+00197     int maxOutputChannels; 
+00198     int maxInputChannels;  
+00199     int maxDuplexChannels; 
+00200     int minOutputChannels; 
+00201     int minInputChannels;  
+00202     int minDuplexChannels; 
+00203     bool hasDuplexSupport; 
+00204     bool isDefault;        
+00205     std::vector<int> sampleRates; 
+00206     RtAudioFormat nativeFormats;  
+00208     // Default constructor.
+00209     RtApiDevice()
+00210       :probed(false), apiDeviceId(0), maxOutputChannels(0), maxInputChannels(0),
+00211        maxDuplexChannels(0), minOutputChannels(0), minInputChannels(0),
+00212        minDuplexChannels(0), isDefault(false), nativeFormats(0) {}
+00213   };
+00214 
+00215   typedef signed short Int16;
+00216   typedef signed int Int32;
+00217   typedef float Float32;
+00218   typedef double Float64;
+00219 
+00220   char message_[256];
+00221   int nDevices_;
+00222   std::vector<RtApiDevice> devices_;
+00223   RtApiStream stream_;
+00224 
+00229   virtual void initialize(void) = 0;
+00230 
+00239   virtual void probeDeviceInfo( RtApiDevice *info );
+00240 
+00249   virtual bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00250                                 int sampleRate, RtAudioFormat format,
+00251                                 int *bufferSize, int numberOfBuffers );
+00252 
+00257   virtual int getDefaultInputDevice(void);
+00258 
+00263   virtual int getDefaultOutputDevice(void);
+00264 
+00266   void clearDeviceInfo( RtApiDevice *info );
+00267 
+00269   void clearStreamInfo();
+00270 
+00272   void error( RtError::Type type );
+00273 
+00278   void verifyStream();
+00279 
+00284   void convertStreamBuffer( StreamMode mode );
+00285 
+00287   void byteSwapBuffer( char *buffer, int samples, RtAudioFormat format );
+00288 
+00290   int formatBytes( RtAudioFormat format );
+00291 };
+00292 
 00293 
-00294 
-00295 // **************************************************************** //
-00296 //
-00297 // RtAudio class declaration.
-00298 //
-00299 // RtAudio is a "controller" used to select an available audio i/o
-00300 // interface.  It presents a common API for the user to call but all
-00301 // functionality is implemented by the class RtAudioApi and its
-00302 // subclasses.  RtAudio creates an instance of an RtAudioApi subclass
-00303 // based on the user's API choice.  If no choice is made, RtAudio
-00304 // attempts to make a "logical" API selection.
-00305 //
-00306 // **************************************************************** //
-00307 
-00308 class RtAudio
-00309 {
-00310 public:
-00311 
-00313   enum RtAudioApi {
-00314     UNSPECIFIED,    
-00315     LINUX_ALSA,     
-00316     LINUX_OSS,      
-00317     LINUX_JACK,     
-00318     MACOSX_CORE,    
-00319     IRIX_AL,        
-00320     WINDOWS_ASIO,   
-00321     WINDOWS_DS      
-00322   };
-00323 
-00325 
-00335   RtAudio( RtAudioApi api=UNSPECIFIED );
-00336 
-00338 
-00349   RtAudio( int outputDevice, int outputChannels,
-00350            int inputDevice, int inputChannels,
-00351            RtAudioFormat format, int sampleRate,
-00352            int *bufferSize, int numberOfBuffers, RtAudioApi api=UNSPECIFIED );
-00353 
-00355 
-00359   ~RtAudio();
-00360 
-00362 
-00388   void openStream( int outputDevice, int outputChannels,
-00389                    int inputDevice, int inputChannels,
-00390                    RtAudioFormat format, int sampleRate,
-00391                    int *bufferSize, int numberOfBuffers );
-00392 
-00394 
-00413   void setStreamCallback(RtAudioCallback callback, void *userData) { rtapi_->setStreamCallback( callback, userData ); };
-00414 
-00416 
-00423   void cancelStreamCallback() { rtapi_->cancelStreamCallback(); };
-00424 
-00426   int getDeviceCount(void) { return rtapi_->getDeviceCount(); };
-00427 
-00429 
-00437   RtAudioDeviceInfo getDeviceInfo(int device) { return rtapi_->getDeviceInfo( device ); };
-00438 
-00440 
-00445   char * const getStreamBuffer() { return rtapi_->getStreamBuffer(); };
-00446 
-00448 
-00453   void tickStream() { rtapi_->tickStream(); };
-00454 
-00456 
-00460   void closeStream()  { rtapi_->closeStream(); };
-00461 
-00463 
-00467   void startStream() { rtapi_->startStream(); };
-00468 
-00470 
-00474   void stopStream() { rtapi_->stopStream(); };
-00475 
-00477 
-00481   void abortStream() { rtapi_->abortStream(); };
+00294 // **************************************************************** //
+00295 //
+00296 // RtAudio class declaration.
+00297 //
+00298 // RtAudio is a "controller" used to select an available audio i/o
+00299 // interface.  It presents a common API for the user to call but all
+00300 // functionality is implemented by the class RtAudioApi and its
+00301 // subclasses.  RtAudio creates an instance of an RtAudioApi subclass
+00302 // based on the user's API choice.  If no choice is made, RtAudio
+00303 // attempts to make a "logical" API selection.
+00304 //
+00305 // **************************************************************** //
+00306 
+00307 class RtAudio
+00308 {
+00309 public:
+00310 
+00312   enum RtAudioApi {
+00313     UNSPECIFIED,    
+00314     LINUX_ALSA,     
+00315     LINUX_OSS,      
+00316     LINUX_JACK,     
+00317     MACOSX_CORE,    
+00318     IRIX_AL,        
+00319     WINDOWS_ASIO,   
+00320     WINDOWS_DS      
+00321   };
+00322 
+00324 
+00334   RtAudio( RtAudioApi api=UNSPECIFIED );
+00335 
+00337 
+00348   RtAudio( int outputDevice, int outputChannels,
+00349            int inputDevice, int inputChannels,
+00350            RtAudioFormat format, int sampleRate,
+00351            int *bufferSize, int numberOfBuffers, RtAudioApi api=UNSPECIFIED );
+00352 
+00354 
+00358   ~RtAudio();
+00359 
+00361 
+00387   void openStream( int outputDevice, int outputChannels,
+00388                    int inputDevice, int inputChannels,
+00389                    RtAudioFormat format, int sampleRate,
+00390                    int *bufferSize, int numberOfBuffers );
+00391 
+00393 
+00412   void setStreamCallback(RtAudioCallback callback, void *userData) { rtapi_->setStreamCallback( callback, userData ); };
+00413 
+00415 
+00422   void cancelStreamCallback() { rtapi_->cancelStreamCallback(); };
+00423 
+00425   int getDeviceCount(void) { return rtapi_->getDeviceCount(); };
+00426 
+00428 
+00436   RtAudioDeviceInfo getDeviceInfo(int device) { return rtapi_->getDeviceInfo( device ); };
+00437 
+00439 
+00444   char * const getStreamBuffer() { return rtapi_->getStreamBuffer(); };
+00445 
+00447 
+00452   void tickStream() { rtapi_->tickStream(); };
+00453 
+00455 
+00459   void closeStream()  { rtapi_->closeStream(); };
+00460 
+00462 
+00466   void startStream() { rtapi_->startStream(); };
+00467 
+00469 
+00473   void stopStream() { rtapi_->stopStream(); };
+00474 
+00476 
+00480   void abortStream() { rtapi_->abortStream(); };
+00481 
 00482 
-00483 
-00484  protected:
-00485 
-00486   void initialize( RtAudioApi api );
-00487 
-00488   RtApi *rtapi_;
-00489 };
+00483  protected:
+00484 
+00485   void initialize( RtAudioApi api );
+00486 
+00487   RtApi *rtapi_;
+00488 };
+00489 
 00490 
-00491 
-00492 // RtApi Subclass prototypes.
-00493 
-00494 #if defined(__LINUX_ALSA__)
-00495 
-00496 class RtApiAlsa: public RtApi
-00497 {
-00498 public:
-00499 
-00500   RtApiAlsa();
-00501   ~RtApiAlsa();
-00502   void tickStream();
-00503   void closeStream();
-00504   void startStream();
-00505   void stopStream();
-00506   void abortStream();
-00507   int streamWillBlock();
-00508   void setStreamCallback( RtAudioCallback callback, void *userData );
-00509   void cancelStreamCallback();
-00510 
-00511   private:
-00512 
-00513   void initialize(void);
-00514   void probeDeviceInfo( RtApiDevice *info );
-00515   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00516                         int sampleRate, RtAudioFormat format,
-00517                         int *bufferSize, int numberOfBuffers );
-00518 };
-00519 
-00520 #endif
-00521 
-00522 #if defined(__LINUX_JACK__)
-00523 
-00524 class RtApiJack: public RtApi
-00525 {
-00526 public:
-00527 
-00528   RtApiJack();
-00529   ~RtApiJack();
-00530   void tickStream();
-00531   void closeStream();
-00532   void startStream();
-00533   void stopStream();
-00534   void abortStream();
-00535   void setStreamCallback( RtAudioCallback callback, void *userData );
-00536   void cancelStreamCallback();
-00537   // This function is intended for internal use only.  It must be
-00538   // public because it is called by the internal callback handler,
-00539   // which is not a member of RtAudio.  External use of this function
-00540   // will most likely produce highly undesireable results!
-00541   void callbackEvent( unsigned long nframes );
-00542 
-00543   private:
-00544 
-00545   void initialize(void);
-00546   void probeDeviceInfo( RtApiDevice *info );
-00547   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00548                         int sampleRate, RtAudioFormat format,
-00549                         int *bufferSize, int numberOfBuffers );
-00550 };
-00551 
-00552 #endif
-00553 
-00554 #if defined(__LINUX_OSS__)
-00555 
-00556 class RtApiOss: public RtApi
-00557 {
-00558 public:
-00559 
-00560   RtApiOss();
-00561   ~RtApiOss();
-00562   void tickStream();
-00563   void closeStream();
-00564   void startStream();
-00565   void stopStream();
-00566   void abortStream();
-00567   int streamWillBlock();
-00568   void setStreamCallback( RtAudioCallback callback, void *userData );
-00569   void cancelStreamCallback();
-00570 
-00571   private:
-00572 
-00573   void initialize(void);
-00574   void probeDeviceInfo( RtApiDevice *info );
-00575   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00576                         int sampleRate, RtAudioFormat format,
-00577                         int *bufferSize, int numberOfBuffers );
-00578 };
-00579 
-00580 #endif
-00581 
-00582 #if defined(__MACOSX_CORE__)
-00583 
-00584 #include <CoreAudio/AudioHardware.h>
-00585 
-00586 class RtApiCore: public RtApi
-00587 {
-00588 public:
-00589 
-00590   RtApiCore();
-00591   ~RtApiCore();
-00592   int getDefaultOutputDevice(void);
-00593   int getDefaultInputDevice(void);
-00594   void tickStream();
-00595   void closeStream();
-00596   void startStream();
-00597   void stopStream();
-00598   void abortStream();
-00599   void setStreamCallback( RtAudioCallback callback, void *userData );
-00600   void cancelStreamCallback();
-00601 
-00602   // This function is intended for internal use only.  It must be
-00603   // public because it is called by the internal callback handler,
-00604   // which is not a member of RtAudio.  External use of this function
-00605   // will most likely produce highly undesireable results!
-00606   void callbackEvent( AudioDeviceID deviceId, void *inData, void *outData );
-00607 
-00608   private:
-00609 
-00610   void initialize(void);
-00611   void probeDeviceInfo( RtApiDevice *info );
-00612   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00613                         int sampleRate, RtAudioFormat format,
-00614                         int *bufferSize, int numberOfBuffers );
-00615 };
-00616 
-00617 #endif
-00618 
-00619 #if defined(__WINDOWS_DS__)
-00620 
-00621 class RtApiDs: public RtApi
-00622 {
-00623 public:
-00624 
-00625   RtApiDs();
-00626   ~RtApiDs();
-00627   int getDefaultOutputDevice(void);
-00628   int getDefaultInputDevice(void);
-00629   void tickStream();
-00630   void closeStream();
-00631   void startStream();
-00632   void stopStream();
-00633   void abortStream();
-00634   int streamWillBlock();
-00635   void setStreamCallback( RtAudioCallback callback, void *userData );
-00636   void cancelStreamCallback();
-00637 
-00638   private:
-00639 
-00640   void initialize(void);
-00641   void probeDeviceInfo( RtApiDevice *info );
-00642   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00643                         int sampleRate, RtAudioFormat format,
-00644                         int *bufferSize, int numberOfBuffers );
-00645 };
-00646 
-00647 #endif
-00648 
-00649 #if defined(__WINDOWS_ASIO__)
-00650 
-00651 class RtApiAsio: public RtApi
-00652 {
-00653 public:
-00654 
-00655   RtApiAsio();
-00656   ~RtApiAsio();
-00657   void tickStream();
-00658   void closeStream();
-00659   void startStream();
-00660   void stopStream();
-00661   void abortStream();
-00662   void setStreamCallback( RtAudioCallback callback, void *userData );
-00663   void cancelStreamCallback();
-00664 
-00665   // This function is intended for internal use only.  It must be
-00666   // public because it is called by the internal callback handler,
-00667   // which is not a member of RtAudio.  External use of this function
-00668   // will most likely produce highly undesireable results!
-00669   void callbackEvent( long bufferIndex );
-00670 
-00671   private:
-00672 
-00673   void initialize(void);
-00674   void probeDeviceInfo( RtApiDevice *info );
-00675   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00676                         int sampleRate, RtAudioFormat format,
-00677                         int *bufferSize, int numberOfBuffers );
-00678 };
-00679 
-00680 #endif
-00681 
-00682 #if defined(__IRIX_AL__)
-00683 
-00684 class RtApiAl: public RtApi
-00685 {
-00686 public:
-00687 
-00688   RtApiAl();
-00689   ~RtApiAl();
-00690   int getDefaultOutputDevice(void);
-00691   int getDefaultInputDevice(void);
-00692   void tickStream();
-00693   void closeStream();
-00694   void startStream();
-00695   void stopStream();
-00696   void abortStream();
-00697   int streamWillBlock();
-00698   void setStreamCallback( RtAudioCallback callback, void *userData );
-00699   void cancelStreamCallback();
-00700 
-00701   private:
-00702 
-00703   void initialize(void);
-00704   void probeDeviceInfo( RtApiDevice *info );
-00705   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
-00706                         int sampleRate, RtAudioFormat format,
-00707                         int *bufferSize, int numberOfBuffers );
-00708 };
-00709 
-00710 #endif
-00711 
-00712 // Define the following flag to have extra information spewed to stderr.
-00713 //#define __RTAUDIO_DEBUG__
-00714 
-00715 #endif
+00491 // RtApi Subclass prototypes.
+00492 
+00493 #if defined(__LINUX_ALSA__)
+00494 
+00495 class RtApiAlsa: public RtApi
+00496 {
+00497 public:
+00498 
+00499   RtApiAlsa();
+00500   ~RtApiAlsa();
+00501   void tickStream();
+00502   void closeStream();
+00503   void startStream();
+00504   void stopStream();
+00505   void abortStream();
+00506   int streamWillBlock();
+00507   void setStreamCallback( RtAudioCallback callback, void *userData );
+00508   void cancelStreamCallback();
+00509 
+00510   private:
+00511 
+00512   void initialize(void);
+00513   void probeDeviceInfo( RtApiDevice *info );
+00514   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00515                         int sampleRate, RtAudioFormat format,
+00516                         int *bufferSize, int numberOfBuffers );
+00517 };
+00518 
+00519 #endif
+00520 
+00521 #if defined(__LINUX_JACK__)
+00522 
+00523 class RtApiJack: public RtApi
+00524 {
+00525 public:
+00526 
+00527   RtApiJack();
+00528   ~RtApiJack();
+00529   void tickStream();
+00530   void closeStream();
+00531   void startStream();
+00532   void stopStream();
+00533   void abortStream();
+00534   void setStreamCallback( RtAudioCallback callback, void *userData );
+00535   void cancelStreamCallback();
+00536   // This function is intended for internal use only.  It must be
+00537   // public because it is called by the internal callback handler,
+00538   // which is not a member of RtAudio.  External use of this function
+00539   // will most likely produce highly undesireable results!
+00540   void callbackEvent( unsigned long nframes );
+00541 
+00542   private:
+00543 
+00544   void initialize(void);
+00545   void probeDeviceInfo( RtApiDevice *info );
+00546   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00547                         int sampleRate, RtAudioFormat format,
+00548                         int *bufferSize, int numberOfBuffers );
+00549 };
+00550 
+00551 #endif
+00552 
+00553 #if defined(__LINUX_OSS__)
+00554 
+00555 class RtApiOss: public RtApi
+00556 {
+00557 public:
+00558 
+00559   RtApiOss();
+00560   ~RtApiOss();
+00561   void tickStream();
+00562   void closeStream();
+00563   void startStream();
+00564   void stopStream();
+00565   void abortStream();
+00566   int streamWillBlock();
+00567   void setStreamCallback( RtAudioCallback callback, void *userData );
+00568   void cancelStreamCallback();
+00569 
+00570   private:
+00571 
+00572   void initialize(void);
+00573   void probeDeviceInfo( RtApiDevice *info );
+00574   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00575                         int sampleRate, RtAudioFormat format,
+00576                         int *bufferSize, int numberOfBuffers );
+00577 };
+00578 
+00579 #endif
+00580 
+00581 #if defined(__MACOSX_CORE__)
+00582 
+00583 #include <CoreAudio/AudioHardware.h>
+00584 
+00585 class RtApiCore: public RtApi
+00586 {
+00587 public:
+00588 
+00589   RtApiCore();
+00590   ~RtApiCore();
+00591   int getDefaultOutputDevice(void);
+00592   int getDefaultInputDevice(void);
+00593   void tickStream();
+00594   void closeStream();
+00595   void startStream();
+00596   void stopStream();
+00597   void abortStream();
+00598   void setStreamCallback( RtAudioCallback callback, void *userData );
+00599   void cancelStreamCallback();
+00600 
+00601   // This function is intended for internal use only.  It must be
+00602   // public because it is called by the internal callback handler,
+00603   // which is not a member of RtAudio.  External use of this function
+00604   // will most likely produce highly undesireable results!
+00605   void callbackEvent( AudioDeviceID deviceId, void *inData, void *outData );
+00606 
+00607   private:
+00608 
+00609   void initialize(void);
+00610   void probeDeviceInfo( RtApiDevice *info );
+00611   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00612                         int sampleRate, RtAudioFormat format,
+00613                         int *bufferSize, int numberOfBuffers );
+00614 };
+00615 
+00616 #endif
+00617 
+00618 #if defined(__WINDOWS_DS__)
+00619 
+00620 class RtApiDs: public RtApi
+00621 {
+00622 public:
+00623 
+00624   RtApiDs();
+00625   ~RtApiDs();
+00626   int getDefaultOutputDevice(void);
+00627   int getDefaultInputDevice(void);
+00628   void tickStream();
+00629   void closeStream();
+00630   void startStream();
+00631   void stopStream();
+00632   void abortStream();
+00633   int streamWillBlock();
+00634   void setStreamCallback( RtAudioCallback callback, void *userData );
+00635   void cancelStreamCallback();
+00636 
+00637   private:
+00638 
+00639   void initialize(void);
+00640   void probeDeviceInfo( RtApiDevice *info );
+00641   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00642                         int sampleRate, RtAudioFormat format,
+00643                         int *bufferSize, int numberOfBuffers );
+00644 };
+00645 
+00646 #endif
+00647 
+00648 #if defined(__WINDOWS_ASIO__)
+00649 
+00650 class RtApiAsio: public RtApi
+00651 {
+00652 public:
+00653 
+00654   RtApiAsio();
+00655   ~RtApiAsio();
+00656   void tickStream();
+00657   void closeStream();
+00658   void startStream();
+00659   void stopStream();
+00660   void abortStream();
+00661   void setStreamCallback( RtAudioCallback callback, void *userData );
+00662   void cancelStreamCallback();
+00663 
+00664   // This function is intended for internal use only.  It must be
+00665   // public because it is called by the internal callback handler,
+00666   // which is not a member of RtAudio.  External use of this function
+00667   // will most likely produce highly undesireable results!
+00668   void callbackEvent( long bufferIndex );
+00669 
+00670   private:
+00671 
+00672   void initialize(void);
+00673   void probeDeviceInfo( RtApiDevice *info );
+00674   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00675                         int sampleRate, RtAudioFormat format,
+00676                         int *bufferSize, int numberOfBuffers );
+00677 };
+00678 
+00679 #endif
+00680 
+00681 #if defined(__IRIX_AL__)
+00682 
+00683 class RtApiAl: public RtApi
+00684 {
+00685 public:
+00686 
+00687   RtApiAl();
+00688   ~RtApiAl();
+00689   int getDefaultOutputDevice(void);
+00690   int getDefaultInputDevice(void);
+00691   void tickStream();
+00692   void closeStream();
+00693   void startStream();
+00694   void stopStream();
+00695   void abortStream();
+00696   int streamWillBlock();
+00697   void setStreamCallback( RtAudioCallback callback, void *userData );
+00698   void cancelStreamCallback();
+00699 
+00700   private:
+00701 
+00702   void initialize(void);
+00703   void probeDeviceInfo( RtApiDevice *info );
+00704   bool probeDeviceOpen( int device, StreamMode mode, int channels, 
+00705                         int sampleRate, RtAudioFormat format,
+00706                         int *bufferSize, int numberOfBuffers );
+00707 };
+00708 
+00709 #endif
+00710 
+00711 // Define the following flag to have extra information spewed to stderr.
+00712 //#define __RTAUDIO_DEBUG__
+00713 
+00714 #endif
 

diff --git a/doc/html/index.html b/doc/html/index.html index 7de36f6..dd2ce52 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -43,7 +43,7 @@ Several API changes have been made in version 3.0 of RtAudio::getDeviceInfo() function was modified to return a globally defined RtAudioDeviceInfo structure. This structure is a simplified version of the previous RTAUDIO_DEVICE structure. In addition, the RTAUDIO_FORMAT structure was renamed RtAudioFormat and defined globally within RtAudio.h. These changes were made for clarity and to better conform with standard C++ programming practices.

The RtError class declaration and definition have been extracted to a separate file (RtError.h). This was done in preparation for a new release of the RtMidi class (planned for Summer 2004).

Download

-Latest Release (11 March 2004): Version 3.0 (200 kB tar/gzipped)

+Latest Release (22 March 2004): Version 3.0.1 (200 kB tar/gzipped)

Getting Started

With version 3.0, it is now possible to compile multiple API support on a given platform and to specify an API choice during class instantiation. In the examples that follow, no API will be specified (in which case, RtAudio attempts to select the most "logical" available API).

The first thing that must be done when using RtAudio is to create an instance of the class. The default constructor scans the underlying audio system to verify that at least one device is available. RtAudio often uses C++ exceptions to report errors, necessitating try/catch blocks around most member functions. The following code example demonstrates default object construction and destruction: