From 36a9647a9f57cb70a7748f702b174cd619c3ecbd Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Fri, 11 Oct 2013 01:50:26 +0200 Subject: Release 4.0.1 tarball --- doc/html/RtAudio_8h-source.html | 682 ++++++++++++++++++------------------- doc/html/RtError_8h-source.html | 62 ++-- doc/html/classRtError-members.html | 22 +- doc/html/classRtError.html | 56 +-- doc/html/functions.html | 26 +- doc/html/functions_enum.html | 2 +- doc/html/functions_eval.html | 22 +- doc/html/index.html | 2 +- 8 files changed, 441 insertions(+), 433 deletions(-) (limited to 'doc') diff --git a/doc/html/RtAudio_8h-source.html b/doc/html/RtAudio_8h-source.html index 5c34773..cb29d93 100644 --- a/doc/html/RtAudio_8h-source.html +++ b/doc/html/RtAudio_8h-source.html @@ -264,367 +264,361 @@ 00564 00565 enum { FAILURE, SUCCESS }; 00566 -00567 enum ErrorType { -00568 WARNING, -00569 INVALID_CALL, -00570 SYSTEM +00567 enum StreamState { +00568 STREAM_STOPPED, +00569 STREAM_RUNNING, +00570 STREAM_CLOSED = -50 00571 }; 00572 -00573 enum StreamState { -00574 STREAM_STOPPED, -00575 STREAM_RUNNING, -00576 STREAM_CLOSED = -50 -00577 }; -00578 -00579 enum StreamMode { -00580 OUTPUT, -00581 INPUT, -00582 DUPLEX, -00583 UNINITIALIZED = -75 -00584 }; -00585 -00586 // A protected structure used for buffer conversion. -00587 struct ConvertInfo { -00588 int channels; -00589 int inJump, outJump; -00590 RtAudioFormat inFormat, outFormat; -00591 std::vector<int> inOffset; -00592 std::vector<int> outOffset; -00593 }; -00594 -00595 // A protected structure for audio streams. -00596 struct RtApiStream { -00597 unsigned int device[2]; // Playback and record, respectively. -00598 void *apiHandle; // void pointer for API specific stream handle information -00599 StreamMode mode; // OUTPUT, INPUT, or DUPLEX. -00600 StreamState state; // STOPPED, RUNNING, or CLOSED -00601 char *userBuffer[2]; // Playback and record, respectively. -00602 char *deviceBuffer; -00603 bool doConvertBuffer[2]; // Playback and record, respectively. -00604 bool userInterleaved; -00605 bool deviceInterleaved[2]; // Playback and record, respectively. -00606 bool doByteSwap[2]; // Playback and record, respectively. -00607 unsigned int sampleRate; -00608 unsigned int bufferSize; -00609 unsigned int nBuffers; -00610 unsigned int nUserChannels[2]; // Playback and record, respectively. -00611 unsigned int nDeviceChannels[2]; // Playback and record channels, respectively. -00612 unsigned int channelOffset[2]; // Playback and record, respectively. -00613 unsigned long latency[2]; // Playback and record, respectively. -00614 RtAudioFormat userFormat; -00615 RtAudioFormat deviceFormat[2]; // Playback and record, respectively. -00616 StreamMutex mutex; -00617 CallbackInfo callbackInfo; -00618 ConvertInfo convertInfo[2]; -00619 double streamTime; // Number of elapsed seconds since the stream started. -00620 -00621 #if defined(HAVE_GETTIMEOFDAY) -00622 struct timeval lastTickTimestamp; -00623 #endif -00624 -00625 RtApiStream() -00626 :apiHandle(0), deviceBuffer(0) {} -00627 }; -00628 -00629 typedef signed short Int16; -00630 typedef signed int Int32; -00631 typedef float Float32; -00632 typedef double Float64; -00633 -00634 std::ostringstream errorStream_; -00635 std::string errorText_; -00636 bool showWarnings_; -00637 RtApiStream stream_; -00638 -00646 virtual bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00647 unsigned int firstChannel, unsigned int sampleRate, -00648 RtAudioFormat format, unsigned int *bufferSize, -00649 RtAudio::StreamOptions *options ); +00573 enum StreamMode { +00574 OUTPUT, +00575 INPUT, +00576 DUPLEX, +00577 UNINITIALIZED = -75 +00578 }; +00579 +00580 // A protected structure used for buffer conversion. +00581 struct ConvertInfo { +00582 int channels; +00583 int inJump, outJump; +00584 RtAudioFormat inFormat, outFormat; +00585 std::vector<int> inOffset; +00586 std::vector<int> outOffset; +00587 }; +00588 +00589 // A protected structure for audio streams. +00590 struct RtApiStream { +00591 unsigned int device[2]; // Playback and record, respectively. +00592 void *apiHandle; // void pointer for API specific stream handle information +00593 StreamMode mode; // OUTPUT, INPUT, or DUPLEX. +00594 StreamState state; // STOPPED, RUNNING, or CLOSED +00595 char *userBuffer[2]; // Playback and record, respectively. +00596 char *deviceBuffer; +00597 bool doConvertBuffer[2]; // Playback and record, respectively. +00598 bool userInterleaved; +00599 bool deviceInterleaved[2]; // Playback and record, respectively. +00600 bool doByteSwap[2]; // Playback and record, respectively. +00601 unsigned int sampleRate; +00602 unsigned int bufferSize; +00603 unsigned int nBuffers; +00604 unsigned int nUserChannels[2]; // Playback and record, respectively. +00605 unsigned int nDeviceChannels[2]; // Playback and record channels, respectively. +00606 unsigned int channelOffset[2]; // Playback and record, respectively. +00607 unsigned long latency[2]; // Playback and record, respectively. +00608 RtAudioFormat userFormat; +00609 RtAudioFormat deviceFormat[2]; // Playback and record, respectively. +00610 StreamMutex mutex; +00611 CallbackInfo callbackInfo; +00612 ConvertInfo convertInfo[2]; +00613 double streamTime; // Number of elapsed seconds since the stream started. +00614 +00615 #if defined(HAVE_GETTIMEOFDAY) +00616 struct timeval lastTickTimestamp; +00617 #endif +00618 +00619 RtApiStream() +00620 :apiHandle(0), deviceBuffer(0) {} +00621 }; +00622 +00623 typedef signed short Int16; +00624 typedef signed int Int32; +00625 typedef float Float32; +00626 typedef double Float64; +00627 +00628 std::ostringstream errorStream_; +00629 std::string errorText_; +00630 bool showWarnings_; +00631 RtApiStream stream_; +00632 +00640 virtual bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00641 unsigned int firstChannel, unsigned int sampleRate, +00642 RtAudioFormat format, unsigned int *bufferSize, +00643 RtAudio::StreamOptions *options ); +00644 +00646 void tickStreamTime( void ); +00647 +00649 void clearStreamInfo(); 00650 -00652 void tickStreamTime( void ); -00653 -00655 void clearStreamInfo(); +00655 void verifyStream( void ); 00656 -00661 void verifyStream( void ); -00662 -00664 void error( ErrorType type ); +00658 void error( RtError::Type type ); +00659 +00664 void convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info ); 00665 -00670 void convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info ); +00667 void byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format ); +00668 +00670 unsigned int formatBytes( RtAudioFormat format ); 00671 -00673 void byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format ); -00674 -00676 unsigned int formatBytes( RtAudioFormat format ); -00677 -00679 void setConvertInfo( StreamMode mode, unsigned int firstChannel ); -00680 }; +00673 void setConvertInfo( StreamMode mode, unsigned int firstChannel ); +00674 }; +00675 +00676 // **************************************************************** // +00677 // +00678 // Inline RtAudio definitions. +00679 // +00680 // **************************************************************** // 00681 -00682 // **************************************************************** // -00683 // -00684 // Inline RtAudio definitions. -00685 // -00686 // **************************************************************** // -00687 -00688 inline RtAudio::Api RtAudio :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }; -00689 inline unsigned int RtAudio :: getDeviceCount( void ) throw() { return rtapi_->getDeviceCount(); }; -00690 inline RtAudio::DeviceInfo RtAudio :: getDeviceInfo( unsigned int device ) { return rtapi_->getDeviceInfo( device ); }; -00691 inline unsigned int RtAudio :: getDefaultInputDevice( void ) throw() { return rtapi_->getDefaultInputDevice(); }; -00692 inline unsigned int RtAudio :: getDefaultOutputDevice( void ) throw() { return rtapi_->getDefaultOutputDevice(); }; -00693 inline void RtAudio :: closeStream( void ) throw() { return rtapi_->closeStream(); }; -00694 inline void RtAudio :: startStream( void ) { return rtapi_->startStream(); }; -00695 inline void RtAudio :: stopStream( void ) { return rtapi_->stopStream(); }; -00696 inline void RtAudio :: abortStream( void ) { return rtapi_->abortStream(); }; -00697 inline bool RtAudio :: isStreamOpen( void ) throw() { return rtapi_->isStreamOpen(); }; -00698 inline bool RtAudio :: isStreamRunning( void ) throw() { return rtapi_->isStreamRunning(); }; -00699 inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); }; -00700 inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); }; -00701 inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); }; +00682 inline RtAudio::Api RtAudio :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }; +00683 inline unsigned int RtAudio :: getDeviceCount( void ) throw() { return rtapi_->getDeviceCount(); }; +00684 inline RtAudio::DeviceInfo RtAudio :: getDeviceInfo( unsigned int device ) { return rtapi_->getDeviceInfo( device ); }; +00685 inline unsigned int RtAudio :: getDefaultInputDevice( void ) throw() { return rtapi_->getDefaultInputDevice(); }; +00686 inline unsigned int RtAudio :: getDefaultOutputDevice( void ) throw() { return rtapi_->getDefaultOutputDevice(); }; +00687 inline void RtAudio :: closeStream( void ) throw() { return rtapi_->closeStream(); }; +00688 inline void RtAudio :: startStream( void ) { return rtapi_->startStream(); }; +00689 inline void RtAudio :: stopStream( void ) { return rtapi_->stopStream(); }; +00690 inline void RtAudio :: abortStream( void ) { return rtapi_->abortStream(); }; +00691 inline bool RtAudio :: isStreamOpen( void ) throw() { return rtapi_->isStreamOpen(); }; +00692 inline bool RtAudio :: isStreamRunning( void ) throw() { return rtapi_->isStreamRunning(); }; +00693 inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); }; +00694 inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); }; +00695 inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); }; +00696 +00697 // RtApi Subclass prototypes. +00698 +00699 #if defined(__MACOSX_CORE__) +00700 +00701 #include <CoreAudio/AudioHardware.h> 00702 -00703 // RtApi Subclass prototypes. -00704 -00705 #if defined(__MACOSX_CORE__) -00706 -00707 #include <CoreAudio/AudioHardware.h> -00708 -00709 class RtApiCore: public RtApi -00710 { -00711 public: -00712 -00713 RtApiCore(); -00714 ~RtApiCore(); -00715 RtAudio::Api getCurrentApi( void ) { return RtAudio::MACOSX_CORE; }; -00716 unsigned int getDeviceCount( void ); -00717 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); -00718 unsigned int getDefaultOutputDevice( void ); -00719 unsigned int getDefaultInputDevice( void ); -00720 void closeStream( void ); -00721 void startStream( void ); -00722 void stopStream( void ); -00723 void abortStream( void ); -00724 long getStreamLatency( void ); -00725 -00726 // This function is intended for internal use only. It must be -00727 // public because it is called by the internal callback handler, -00728 // which is not a member of RtAudio. External use of this function -00729 // will most likely produce highly undesireable results! -00730 bool callbackEvent( AudioDeviceID deviceId, -00731 const AudioBufferList *inBufferList, -00732 const AudioBufferList *outBufferList ); -00733 -00734 private: -00735 -00736 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00737 unsigned int firstChannel, unsigned int sampleRate, -00738 RtAudioFormat format, unsigned int *bufferSize, -00739 RtAudio::StreamOptions *options ); -00740 static const char* getErrorCode( OSStatus code ); -00741 }; -00742 -00743 #endif -00744 -00745 #if defined(__UNIX_JACK__) -00746 -00747 class RtApiJack: public RtApi -00748 { -00749 public: -00750 -00751 RtApiJack(); -00752 ~RtApiJack(); -00753 RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; }; -00754 unsigned int getDeviceCount( void ); -00755 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); -00756 void closeStream( void ); -00757 void startStream( void ); -00758 void stopStream( void ); -00759 void abortStream( void ); -00760 long getStreamLatency( void ); +00703 class RtApiCore: public RtApi +00704 { +00705 public: +00706 +00707 RtApiCore(); +00708 ~RtApiCore(); +00709 RtAudio::Api getCurrentApi( void ) { return RtAudio::MACOSX_CORE; }; +00710 unsigned int getDeviceCount( void ); +00711 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); +00712 unsigned int getDefaultOutputDevice( void ); +00713 unsigned int getDefaultInputDevice( void ); +00714 void closeStream( void ); +00715 void startStream( void ); +00716 void stopStream( void ); +00717 void abortStream( void ); +00718 long getStreamLatency( void ); +00719 +00720 // This function is intended for internal use only. It must be +00721 // public because it is called by the internal callback handler, +00722 // which is not a member of RtAudio. External use of this function +00723 // will most likely produce highly undesireable results! +00724 bool callbackEvent( AudioDeviceID deviceId, +00725 const AudioBufferList *inBufferList, +00726 const AudioBufferList *outBufferList ); +00727 +00728 private: +00729 +00730 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00731 unsigned int firstChannel, unsigned int sampleRate, +00732 RtAudioFormat format, unsigned int *bufferSize, +00733 RtAudio::StreamOptions *options ); +00734 static const char* getErrorCode( OSStatus code ); +00735 }; +00736 +00737 #endif +00738 +00739 #if defined(__UNIX_JACK__) +00740 +00741 class RtApiJack: public RtApi +00742 { +00743 public: +00744 +00745 RtApiJack(); +00746 ~RtApiJack(); +00747 RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; }; +00748 unsigned int getDeviceCount( void ); +00749 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); +00750 void closeStream( void ); +00751 void startStream( void ); +00752 void stopStream( void ); +00753 void abortStream( void ); +00754 long getStreamLatency( void ); +00755 +00756 // This function is intended for internal use only. It must be +00757 // public because it is called by the internal callback handler, +00758 // which is not a member of RtAudio. External use of this function +00759 // will most likely produce highly undesireable results! +00760 bool callbackEvent( unsigned long nframes ); 00761 -00762 // This function is intended for internal use only. It must be -00763 // public because it is called by the internal callback handler, -00764 // which is not a member of RtAudio. External use of this function -00765 // will most likely produce highly undesireable results! -00766 bool callbackEvent( unsigned long nframes ); -00767 -00768 private: +00762 private: +00763 +00764 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00765 unsigned int firstChannel, unsigned int sampleRate, +00766 RtAudioFormat format, unsigned int *bufferSize, +00767 RtAudio::StreamOptions *options ); +00768 }; 00769 -00770 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00771 unsigned int firstChannel, unsigned int sampleRate, -00772 RtAudioFormat format, unsigned int *bufferSize, -00773 RtAudio::StreamOptions *options ); -00774 }; -00775 -00776 #endif -00777 -00778 #if defined(__WINDOWS_ASIO__) -00779 -00780 class RtApiAsio: public RtApi -00781 { -00782 public: -00783 -00784 RtApiAsio(); -00785 ~RtApiAsio(); -00786 RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_ASIO; }; -00787 unsigned int getDeviceCount( void ); -00788 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); -00789 void closeStream( void ); -00790 void startStream( void ); -00791 void stopStream( void ); -00792 void abortStream( void ); -00793 long getStreamLatency( void ); +00770 #endif +00771 +00772 #if defined(__WINDOWS_ASIO__) +00773 +00774 class RtApiAsio: public RtApi +00775 { +00776 public: +00777 +00778 RtApiAsio(); +00779 ~RtApiAsio(); +00780 RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_ASIO; }; +00781 unsigned int getDeviceCount( void ); +00782 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); +00783 void closeStream( void ); +00784 void startStream( void ); +00785 void stopStream( void ); +00786 void abortStream( void ); +00787 long getStreamLatency( void ); +00788 +00789 // This function is intended for internal use only. It must be +00790 // public because it is called by the internal callback handler, +00791 // which is not a member of RtAudio. External use of this function +00792 // will most likely produce highly undesireable results! +00793 bool callbackEvent( long bufferIndex ); 00794 -00795 // This function is intended for internal use only. It must be -00796 // public because it is called by the internal callback handler, -00797 // which is not a member of RtAudio. External use of this function -00798 // will most likely produce highly undesireable results! -00799 bool callbackEvent( long bufferIndex ); -00800 -00801 private: -00802 -00803 bool coInitialized_; -00804 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00805 unsigned int firstChannel, unsigned int sampleRate, -00806 RtAudioFormat format, unsigned int *bufferSize, -00807 RtAudio::StreamOptions *options ); -00808 }; -00809 -00810 #endif -00811 -00812 #if defined(__WINDOWS_DS__) -00813 -00814 class RtApiDs: public RtApi -00815 { -00816 public: -00817 -00818 RtApiDs(); -00819 ~RtApiDs(); -00820 RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_DS; }; -00821 unsigned int getDeviceCount( void ); -00822 unsigned int getDefaultOutputDevice( void ); -00823 unsigned int getDefaultInputDevice( void ); -00824 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); -00825 void closeStream( void ); -00826 void startStream( void ); -00827 void stopStream( void ); -00828 void abortStream( void ); -00829 long getStreamLatency( void ); +00795 private: +00796 +00797 bool coInitialized_; +00798 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00799 unsigned int firstChannel, unsigned int sampleRate, +00800 RtAudioFormat format, unsigned int *bufferSize, +00801 RtAudio::StreamOptions *options ); +00802 }; +00803 +00804 #endif +00805 +00806 #if defined(__WINDOWS_DS__) +00807 +00808 class RtApiDs: public RtApi +00809 { +00810 public: +00811 +00812 RtApiDs(); +00813 ~RtApiDs(); +00814 RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_DS; }; +00815 unsigned int getDeviceCount( void ); +00816 unsigned int getDefaultOutputDevice( void ); +00817 unsigned int getDefaultInputDevice( void ); +00818 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); +00819 void closeStream( void ); +00820 void startStream( void ); +00821 void stopStream( void ); +00822 void abortStream( void ); +00823 long getStreamLatency( void ); +00824 +00825 // This function is intended for internal use only. It must be +00826 // public because it is called by the internal callback handler, +00827 // which is not a member of RtAudio. External use of this function +00828 // will most likely produce highly undesireable results! +00829 void callbackEvent( void ); 00830 -00831 // This function is intended for internal use only. It must be -00832 // public because it is called by the internal callback handler, -00833 // which is not a member of RtAudio. External use of this function -00834 // will most likely produce highly undesireable results! -00835 void callbackEvent( void ); -00836 -00837 private: -00838 -00839 bool coInitialized_; -00840 bool buffersRolling; -00841 long duplexPrerollBytes; -00842 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00843 unsigned int firstChannel, unsigned int sampleRate, -00844 RtAudioFormat format, unsigned int *bufferSize, -00845 RtAudio::StreamOptions *options ); -00846 }; -00847 -00848 #endif -00849 -00850 #if defined(__LINUX_ALSA__) -00851 -00852 class RtApiAlsa: public RtApi -00853 { -00854 public: -00855 -00856 RtApiAlsa(); -00857 ~RtApiAlsa(); -00858 RtAudio::Api getCurrentApi() { return RtAudio::LINUX_ALSA; }; -00859 unsigned int getDeviceCount( void ); -00860 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); -00861 void closeStream( void ); -00862 void startStream( void ); -00863 void stopStream( void ); -00864 void abortStream( void ); +00831 private: +00832 +00833 bool coInitialized_; +00834 bool buffersRolling; +00835 long duplexPrerollBytes; +00836 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00837 unsigned int firstChannel, unsigned int sampleRate, +00838 RtAudioFormat format, unsigned int *bufferSize, +00839 RtAudio::StreamOptions *options ); +00840 }; +00841 +00842 #endif +00843 +00844 #if defined(__LINUX_ALSA__) +00845 +00846 class RtApiAlsa: public RtApi +00847 { +00848 public: +00849 +00850 RtApiAlsa(); +00851 ~RtApiAlsa(); +00852 RtAudio::Api getCurrentApi() { return RtAudio::LINUX_ALSA; }; +00853 unsigned int getDeviceCount( void ); +00854 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); +00855 void closeStream( void ); +00856 void startStream( void ); +00857 void stopStream( void ); +00858 void abortStream( void ); +00859 +00860 // This function is intended for internal use only. It must be +00861 // public because it is called by the internal callback handler, +00862 // which is not a member of RtAudio. External use of this function +00863 // will most likely produce highly undesireable results! +00864 void callbackEvent( void ); 00865 -00866 // This function is intended for internal use only. It must be -00867 // public because it is called by the internal callback handler, -00868 // which is not a member of RtAudio. External use of this function -00869 // will most likely produce highly undesireable results! -00870 void callbackEvent( void ); -00871 -00872 private: +00866 private: +00867 +00868 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00869 unsigned int firstChannel, unsigned int sampleRate, +00870 RtAudioFormat format, unsigned int *bufferSize, +00871 RtAudio::StreamOptions *options ); +00872 }; 00873 -00874 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00875 unsigned int firstChannel, unsigned int sampleRate, -00876 RtAudioFormat format, unsigned int *bufferSize, -00877 RtAudio::StreamOptions *options ); -00878 }; -00879 -00880 #endif -00881 -00882 #if defined(__LINUX_OSS__) -00883 -00884 class RtApiOss: public RtApi -00885 { -00886 public: -00887 -00888 RtApiOss(); -00889 ~RtApiOss(); -00890 RtAudio::Api getCurrentApi() { return RtAudio::LINUX_OSS; }; -00891 unsigned int getDeviceCount( void ); -00892 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); -00893 void closeStream( void ); -00894 void startStream( void ); -00895 void stopStream( void ); -00896 void abortStream( void ); +00874 #endif +00875 +00876 #if defined(__LINUX_OSS__) +00877 +00878 class RtApiOss: public RtApi +00879 { +00880 public: +00881 +00882 RtApiOss(); +00883 ~RtApiOss(); +00884 RtAudio::Api getCurrentApi() { return RtAudio::LINUX_OSS; }; +00885 unsigned int getDeviceCount( void ); +00886 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); +00887 void closeStream( void ); +00888 void startStream( void ); +00889 void stopStream( void ); +00890 void abortStream( void ); +00891 +00892 // This function is intended for internal use only. It must be +00893 // public because it is called by the internal callback handler, +00894 // which is not a member of RtAudio. External use of this function +00895 // will most likely produce highly undesireable results! +00896 void callbackEvent( void ); 00897 -00898 // This function is intended for internal use only. It must be -00899 // public because it is called by the internal callback handler, -00900 // which is not a member of RtAudio. External use of this function -00901 // will most likely produce highly undesireable results! -00902 void callbackEvent( void ); -00903 -00904 private: +00898 private: +00899 +00900 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00901 unsigned int firstChannel, unsigned int sampleRate, +00902 RtAudioFormat format, unsigned int *bufferSize, +00903 RtAudio::StreamOptions *options ); +00904 }; 00905 -00906 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00907 unsigned int firstChannel, unsigned int sampleRate, -00908 RtAudioFormat format, unsigned int *bufferSize, -00909 RtAudio::StreamOptions *options ); -00910 }; -00911 -00912 #endif -00913 -00914 #if defined(__RTAUDIO_DUMMY__) -00915 -00916 class RtApiDummy: public RtApi -00917 { -00918 public: -00919 -00920 RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( WARNING ); }; -00921 RtAudio::Api getCurrentApi( void ) { return RtAudio::RTAUDIO_DUMMY; }; -00922 unsigned int getDeviceCount( void ) { return 0; }; -00923 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) { RtAudio::DeviceInfo info; return info; }; -00924 void closeStream( void ) {}; -00925 void startStream( void ) {}; -00926 void stopStream( void ) {}; -00927 void abortStream( void ) {}; -00928 -00929 private: +00906 #endif +00907 +00908 #if defined(__RTAUDIO_DUMMY__) +00909 +00910 class RtApiDummy: public RtApi +00911 { +00912 public: +00913 +00914 RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( WARNING ); }; +00915 RtAudio::Api getCurrentApi( void ) { return RtAudio::RTAUDIO_DUMMY; }; +00916 unsigned int getDeviceCount( void ) { return 0; }; +00917 RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) { RtAudio::DeviceInfo info; return info; }; +00918 void closeStream( void ) {}; +00919 void startStream( void ) {}; +00920 void stopStream( void ) {}; +00921 void abortStream( void ) {}; +00922 +00923 private: +00924 +00925 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, +00926 unsigned int firstChannel, unsigned int sampleRate, +00927 RtAudioFormat format, unsigned int *bufferSize, +00928 RtAudio::StreamOptions *options ) { return false; }; +00929 }; 00930 -00931 bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels, -00932 unsigned int firstChannel, unsigned int sampleRate, -00933 RtAudioFormat format, unsigned int *bufferSize, -00934 RtAudio::StreamOptions *options ) { return false; }; -00935 }; -00936 -00937 #endif -00938 -00939 #endif -00940 -00941 // Indentation settings for Vim and Emacs -00942 // -00943 // Local Variables: -00944 // c-basic-offset: 2 -00945 // indent-tabs-mode: nil -00946 // End: -00947 // -00948 // vim: et sts=2 sw=2 +00931 #endif +00932 +00933 #endif +00934 +00935 // Indentation settings for Vim and Emacs +00936 // +00937 // Local Variables: +00938 // c-basic-offset: 2 +00939 // indent-tabs-mode: nil +00940 // End: +00941 // +00942 // vim: et sts=2 sw=2
diff --git a/doc/html/RtError_8h-source.html b/doc/html/RtError_8h-source.html index 7d28615..aa18569 100644 --- a/doc/html/RtError_8h-source.html +++ b/doc/html/RtError_8h-source.html @@ -22,36 +22,38 @@ 00019class RtError : public std::exception 00020 { 00021 public: -00023enumType { -00024 UNSPECIFIED, -00025 NO_DEVICES_FOUND, -00026 INVALID_DEVICE, -00027 MEMORY_ERROR, -00028 INVALID_PARAMETER, -00029 INVALID_USE, -00030 DRIVER_ERROR, -00031 SYSTEM_ERROR, -00032THREAD_ERROR -00033 }; -00034 -00036RtError( const std::string& message, Type type = RtError::UNSPECIFIED ) throw() : message_(message), type_(type) {} -00037 -00039virtual~RtError( void ) throw() {} -00040 -00042virtualvoidprintMessage( void ) throw() { std::cerr << '\n' << message_ << "\n\n"; } -00043 -00045virtualconstType& getType(void) throw() { return type_; } -00046 -00048virtualconst std::string& getMessage(void) throw() { return message_; } -00049 -00051virtualconstchar* what( void ) const throw() { return message_.c_str(); } -00052 -00053 protected: -00054 std::string message_; -00055 Type type_; -00056 }; -00057 -00058 #endif +00023enumType { +00024 WARNING, +00025 DEBUG_WARNING, +00026 UNSPECIFIED, +00027 NO_DEVICES_FOUND, +00028 INVALID_DEVICE, +00029 MEMORY_ERROR, +00030 INVALID_PARAMETER, +00031 INVALID_USE, +00032 DRIVER_ERROR, +00033 SYSTEM_ERROR, +00034THREAD_ERROR +00035 }; +00036 +00038RtError( const std::string& message, Type type = RtError::UNSPECIFIED ) throw() : message_(message), type_(type) {} +00039 +00041virtual~RtError( void ) throw() {} +00042 +00044virtualvoidprintMessage( void ) throw() { std::cerr << '\n' << message_ << "\n\n"; } +00045 +00047virtualconstType& getType(void) throw() { return type_; } +00048 +00050virtualconst std::string& getMessage(void) throw() { return message_; } +00051 +00053virtualconstchar* what( void ) const throw() { return message_.c_str(); } +00054 +00055 protected: +00056 std::string message_; +00057 Type type_; +00058 }; +00059 +00060 #endif
diff --git a/doc/html/classRtError-members.html b/doc/html/classRtError-members.html index 9e99b27..a6ddae2 100644 --- a/doc/html/classRtError-members.html +++ b/doc/html/classRtError-members.html @@ -10,20 +10,22 @@

RtError Member List

This is the complete list of members for RtError, including all inherited members.

- + + - - - - - + + + + + - - - - + + + + +
DRIVER_ERROR enum valueRtError
DEBUG_WARNING enum valueRtError
DRIVER_ERROR enum valueRtError
getMessage(void)RtError [inline, virtual]
getType(void)RtError [inline, virtual]
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_USE enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_USE enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
printMessage(void)RtError [inline, virtual]
RtError(const std::string &message, Type type=RtError::UNSPECIFIED)RtError [inline]
SYSTEM_ERROR enum valueRtError
THREAD_ERROR enum valueRtError
Type enum nameRtError
UNSPECIFIED enum valueRtError
SYSTEM_ERROR enum valueRtError
THREAD_ERROR enum valueRtError
Type enum nameRtError
UNSPECIFIED enum valueRtError
WARNING enum valueRtError
what(void) const RtError [inline, virtual]
~RtError(void)RtError [inline, virtual]

diff --git a/doc/html/classRtError.html b/doc/html/classRtError.html index 244c52f..c68fa0a 100644 --- a/doc/html/classRtError.html +++ b/doc/html/classRtError.html @@ -17,25 +17,27 @@ List of all members. - - + +  +virtual const Type

Public Types

enum  Type {
-  UNSPECIFIED, -NO_DEVICES_FOUND, -INVALID_DEVICE, -MEMORY_ERROR, +
enum  Type {
+  WARNING, +DEBUG_WARNING, +UNSPECIFIED, +NO_DEVICES_FOUND,
-  INVALID_PARAMETER, -INVALID_USE, -DRIVER_ERROR, -SYSTEM_ERROR, +  INVALID_DEVICE, +MEMORY_ERROR, +INVALID_PARAMETER, +INVALID_USE,
-  THREAD_ERROR +  DRIVER_ERROR, +SYSTEM_ERROR, +THREAD_ERROR
}
 Defined RtError types. More...
 Defined RtError types. More...

Public Member Functions

RtError (const std::string &message, Type type=RtError::UNSPECIFIED) throw ()
RtError (const std::string &message, Type type=RtError::UNSPECIFIED) throw ()
 The constructor.
@@ -47,7 +49,7 @@ virtual void  Prints thrown error message to stderr.
-virtual const TypegetType (void) throw ()
getType (void) throw ()
 Returns the thrown error message type.
@@ -62,16 +64,16 @@ virtual const char * 

Detailed Description

Exception handling class for RtAudio & RtMidi.

-The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. See the RtAudio and RtMidi documentation to know which methods can throw an RtError. +The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. See the RtAudio and RtMidi documentation to know which methods can throw an RtError.


Member Enumeration Documentation

-

+

@@ -89,23 +91,27 @@ Defined RtError types.

Enumerator:
- +
enum RtError::Type enum RtError::Type
- + + - - - - - - - -
UNSPECIFIED  +
WARNING  +A non-critical error.
DEBUG_WARNING  +A non-critical error which might be useful for debugging.
UNSPECIFIED  The default, unspecified error type.
NO_DEVICES_FOUND  +
NO_DEVICES_FOUND  No devices found on system.
INVALID_DEVICE  +
INVALID_DEVICE  An invalid device ID was specified.
MEMORY_ERROR  +
MEMORY_ERROR  An error occured during memory allocation.
INVALID_PARAMETER  +
INVALID_PARAMETER  An invalid parameter was specified to a function.
INVALID_USE  +
INVALID_USE  The function was called incorrectly.
DRIVER_ERROR  +
DRIVER_ERROR  A system driver error occured.
SYSTEM_ERROR  +
SYSTEM_ERROR  A system error occured.
THREAD_ERROR  +
THREAD_ERROR  A thread error occured.
diff --git a/doc/html/functions.html b/doc/html/functions.html index 2593f8d..67a62fa 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -23,9 +23,10 @@ Here is a list of all documented class members with links to the class documenta

  • closeStream() : RtAudio

    - d -

    - f -

    - t -

    +: RtError
  • Type +: RtError

    - u -

    +: RtError, RtAudio

    - w -

    diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html index 1e61aa3..39b0cbf 100644 --- a/doc/html/functions_enum.html +++ b/doc/html/functions_enum.html @@ -15,7 +15,7 @@ +: RtError
    diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html index ffa7320..6830de5 100644 --- a/doc/html/functions_eval.html +++ b/doc/html/functions_eval.html @@ -13,21 +13,23 @@


    diff --git a/doc/html/index.html b/doc/html/index.html index 125e928..b683144 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -38,7 +38,7 @@ What's New (Version 4.0)

    Devices are now re-enumerated every time the RtAudio::getDeviceCount(), RtAudio::getDeviceInfo(), and RtAudio::openStream() functions are called. This allows for the proper identification of hot-pluggable (USB, Firewire, ...) devices while a given RtAudio instance exists.

    Download

    -Latest Release (7 August 2007): Version 4.0.0

    +Latest Release (13 August 2007): Version 4.0.1

    Documentation Links

    1. Error Handling
    2. Probing Device Capabilities
    3. Device Settings
    4. Playback
    5. Recording
    6. Duplex Mode
    7. Using Simultaneous Multiple APIs
    8. Debugging & Compiling
    9. API Notes
    10. Acknowledgements
    11. License
    12. Bug Tracker
    13. Possible Updates
    14. RtAudio at SourceForge
    -- cgit v1.2.3