12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184 |
- #ifdef RTAUDIO_ENABLED
- #if defined(OSX_ENABLED)
- #define __MACOSX_CORE__
- #elif defined(UNIX_ENABLED)
- #define __LINUX_ALSA__
- #elif defined(WINDOWS_ENABLED)
- #if defined(UWP_ENABLED)
- #define __RTAUDIO_DUMMY__
- #else
- #define __WINDOWS_DS__
- #endif
- #endif
- #ifndef __RTAUDIO_H
- #define __RTAUDIO_H
- #define RTAUDIO_VERSION "4.1.2"
- #include <string>
- #include <vector>
- #include <exception>
- #include <iostream>
- typedef unsigned long RtAudioFormat;
- static const RtAudioFormat RTAUDIO_SINT8 = 0x1;
- static const RtAudioFormat RTAUDIO_SINT16 = 0x2;
- static const RtAudioFormat RTAUDIO_SINT24 = 0x4;
- static const RtAudioFormat RTAUDIO_SINT32 = 0x8;
- static const RtAudioFormat RTAUDIO_FLOAT32 = 0x10;
- static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20;
- typedef unsigned int RtAudioStreamFlags;
- static const RtAudioStreamFlags RTAUDIO_NONINTERLEAVED = 0x1;
- static const RtAudioStreamFlags RTAUDIO_MINIMIZE_LATENCY = 0x2;
- static const RtAudioStreamFlags RTAUDIO_HOG_DEVICE = 0x4;
- static const RtAudioStreamFlags RTAUDIO_SCHEDULE_REALTIME = 0x8;
- static const RtAudioStreamFlags RTAUDIO_ALSA_USE_DEFAULT = 0x10;
- typedef unsigned int RtAudioStreamStatus;
- static const RtAudioStreamStatus RTAUDIO_INPUT_OVERFLOW = 0x1;
- static const RtAudioStreamStatus RTAUDIO_OUTPUT_UNDERFLOW = 0x2;
- typedef int (*RtAudioCallback)( void *outputBuffer, void *inputBuffer,
- unsigned int nFrames,
- double streamTime,
- RtAudioStreamStatus status,
- void *userData );
- class RtAudioError : public std::exception
- {
- public:
-
- enum Type {
- WARNING,
- DEBUG_WARNING,
- UNSPECIFIED,
- NO_DEVICES_FOUND,
- INVALID_DEVICE,
- MEMORY_ERROR,
- INVALID_PARAMETER,
- INVALID_USE,
- DRIVER_ERROR,
- SYSTEM_ERROR,
- THREAD_ERROR
- };
-
- RtAudioError( const std::string& message, Type type = RtAudioError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
-
- virtual ~RtAudioError( void ) throw() {}
-
- virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
-
- virtual const Type& getType(void) const throw() { return type_; }
-
- virtual const std::string& getMessage(void) const throw() { return message_; }
-
- virtual const char* what( void ) const throw() { return message_.c_str(); }
- protected:
- std::string message_;
- Type type_;
- };
- typedef void (*RtAudioErrorCallback)( RtAudioError::Type type, const std::string &errorText );
- class RtApi;
- class RtAudio
- {
- public:
-
- enum Api {
- UNSPECIFIED,
- LINUX_ALSA,
- LINUX_PULSE,
- LINUX_OSS,
- UNIX_JACK,
- MACOSX_CORE,
- WINDOWS_WASAPI,
- WINDOWS_ASIO,
- WINDOWS_DS,
- RTAUDIO_DUMMY
- };
-
- struct DeviceInfo {
- bool probed;
- std::string name;
- unsigned int outputChannels;
- unsigned int inputChannels;
- unsigned int duplexChannels;
- bool isDefaultOutput;
- bool isDefaultInput;
- std::vector<unsigned int> sampleRates;
- unsigned int preferredSampleRate;
- RtAudioFormat nativeFormats;
-
- DeviceInfo()
- :probed(false), outputChannels(0), inputChannels(0), duplexChannels(0),
- isDefaultOutput(false), isDefaultInput(false), preferredSampleRate(0), nativeFormats(0) {}
- };
-
- struct StreamParameters {
- unsigned int deviceId;
- unsigned int nChannels;
- unsigned int firstChannel;
-
- StreamParameters()
- : deviceId(0), nChannels(0), firstChannel(0) {}
- };
-
-
- struct StreamOptions {
- RtAudioStreamFlags flags;
- unsigned int numberOfBuffers;
- std::string streamName;
- int priority;
-
- StreamOptions()
- : flags(0), numberOfBuffers(0), priority(0) {}
- };
-
- static std::string getVersion( void ) throw();
-
-
- static void getCompiledApi( std::vector<RtAudio::Api> &apis ) throw();
-
-
- RtAudio( RtAudio::Api api=UNSPECIFIED );
-
-
- ~RtAudio() throw();
-
- RtAudio::Api getCurrentApi( void ) throw();
-
-
- unsigned int getDeviceCount( void ) throw();
-
-
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
-
-
- unsigned int getDefaultOutputDevice( void ) throw();
-
-
- unsigned int getDefaultInputDevice( void ) throw();
-
-
- void openStream( RtAudio::StreamParameters *outputParameters,
- RtAudio::StreamParameters *inputParameters,
- RtAudioFormat format, unsigned int sampleRate,
- unsigned int *bufferFrames, RtAudioCallback callback,
- void *userData = NULL, RtAudio::StreamOptions *options = NULL, RtAudioErrorCallback errorCallback = NULL );
-
-
- void closeStream( void ) throw();
-
-
- void startStream( void );
-
-
- void stopStream( void );
-
-
- void abortStream( void );
-
- bool isStreamOpen( void ) const throw();
-
- bool isStreamRunning( void ) const throw();
-
-
- double getStreamTime( void );
-
-
- void setStreamTime( double time );
-
-
- long getStreamLatency( void );
-
-
- unsigned int getStreamSampleRate( void );
-
- void showWarnings( bool value = true ) throw();
- protected:
- void openRtApi( RtAudio::Api api );
- RtApi *rtapi_;
- };
- #if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_WASAPI__)
- #ifndef NOMINMAX
- #define NOMINMAX
- #endif
- #include <windows.h>
- #include <process.h>
- typedef uintptr_t ThreadHandle;
- typedef CRITICAL_SECTION StreamMutex;
- #elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)
-
- #include <pthread.h>
- typedef pthread_t ThreadHandle;
- typedef pthread_mutex_t StreamMutex;
- #else
- #define __RTAUDIO_DUMMY__
- typedef int ThreadHandle;
- typedef int StreamMutex;
- #endif
- struct CallbackInfo {
- void *object;
- ThreadHandle thread;
- void *callback;
- void *userData;
- void *errorCallback;
- void *apiInfo;
- bool isRunning;
- bool doRealtime;
- int priority;
-
- CallbackInfo()
- :object(0), callback(0), userData(0), errorCallback(0), apiInfo(0), isRunning(false), doRealtime(false) {}
- };
- #pragma pack(push, 1)
- class S24 {
- protected:
- unsigned char c3[3];
- public:
- S24() {}
- S24& operator = ( const int& i ) {
- c3[0] = (i & 0x000000ff);
- c3[1] = (i & 0x0000ff00) >> 8;
- c3[2] = (i & 0x00ff0000) >> 16;
- return *this;
- }
- S24( const S24& v ) { *this = v; }
- S24( const double& d ) { *this = (int) d; }
- S24( const float& f ) { *this = (int) f; }
- S24( const signed short& s ) { *this = (int) s; }
- S24( const char& c ) { *this = (int) c; }
- int asInt() {
- int i = c3[0] | (c3[1] << 8) | (c3[2] << 16);
- if (i & 0x800000) i |= ~0xffffff;
- return i;
- }
- };
- #pragma pack(pop)
- #if defined( HAVE_GETTIMEOFDAY )
- #include <sys/time.h>
- #endif
- #include <sstream>
- class RtApi
- {
- public:
- RtApi();
- virtual ~RtApi();
- virtual RtAudio::Api getCurrentApi( void ) = 0;
- virtual unsigned int getDeviceCount( void ) = 0;
- virtual RtAudio::DeviceInfo getDeviceInfo( unsigned int device ) = 0;
- virtual unsigned int getDefaultInputDevice( void );
- virtual unsigned int getDefaultOutputDevice( void );
- void openStream( RtAudio::StreamParameters *outputParameters,
- RtAudio::StreamParameters *inputParameters,
- RtAudioFormat format, unsigned int sampleRate,
- unsigned int *bufferFrames, RtAudioCallback callback,
- void *userData, RtAudio::StreamOptions *options,
- RtAudioErrorCallback errorCallback );
- virtual void closeStream( void );
- virtual void startStream( void ) = 0;
- virtual void stopStream( void ) = 0;
- virtual void abortStream( void ) = 0;
- long getStreamLatency( void );
- unsigned int getStreamSampleRate( void );
- virtual double getStreamTime( void );
- virtual void setStreamTime( double time );
- bool isStreamOpen( void ) const { return stream_.state != STREAM_CLOSED; }
- bool isStreamRunning( void ) const { return stream_.state == STREAM_RUNNING; }
- void showWarnings( bool value ) { showWarnings_ = value; }
- protected:
- static const unsigned int MAX_SAMPLE_RATES;
- static const unsigned int SAMPLE_RATES[];
- enum { FAILURE, SUCCESS };
- enum StreamState {
- STREAM_STOPPED,
- STREAM_STOPPING,
- STREAM_RUNNING,
- STREAM_CLOSED = -50
- };
- enum StreamMode {
- OUTPUT,
- INPUT,
- DUPLEX,
- UNINITIALIZED = -75
- };
-
- struct ConvertInfo {
- int channels;
- int inJump, outJump;
- RtAudioFormat inFormat, outFormat;
- std::vector<int> inOffset;
- std::vector<int> outOffset;
- };
-
- struct RtApiStream {
- unsigned int device[2];
- void *apiHandle;
- StreamMode mode;
- StreamState state;
- char *userBuffer[2];
- char *deviceBuffer;
- bool doConvertBuffer[2];
- bool userInterleaved;
- bool deviceInterleaved[2];
- bool doByteSwap[2];
- unsigned int sampleRate;
- unsigned int bufferSize;
- unsigned int nBuffers;
- unsigned int nUserChannels[2];
- unsigned int nDeviceChannels[2];
- unsigned int channelOffset[2];
- unsigned long latency[2];
- RtAudioFormat userFormat;
- RtAudioFormat deviceFormat[2];
- StreamMutex mutex;
- CallbackInfo callbackInfo;
- ConvertInfo convertInfo[2];
- double streamTime;
- #if defined(HAVE_GETTIMEOFDAY)
- struct timeval lastTickTimestamp;
- #endif
- RtApiStream()
- :apiHandle(0), deviceBuffer(0) { device[0] = 11111; device[1] = 11111; }
- };
- typedef S24 Int24;
- typedef signed short Int16;
- typedef signed int Int32;
- typedef float Float32;
- typedef double Float64;
- std::ostringstream errorStream_;
- std::string errorText_;
- bool showWarnings_;
- RtApiStream stream_;
- bool firstErrorOccurred_;
-
- virtual bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
-
- void tickStreamTime( void );
-
- void clearStreamInfo();
-
- void verifyStream( void );
-
- void error( RtAudioError::Type type );
-
- void convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info );
-
- void byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format );
-
- unsigned int formatBytes( RtAudioFormat format );
-
- void setConvertInfo( StreamMode mode, unsigned int firstChannel );
- };
- inline RtAudio::Api RtAudio :: getCurrentApi( void ) throw() { return rtapi_->getCurrentApi(); }
- inline unsigned int RtAudio :: getDeviceCount( void ) throw() { return rtapi_->getDeviceCount(); }
- inline RtAudio::DeviceInfo RtAudio :: getDeviceInfo( unsigned int device ) { return rtapi_->getDeviceInfo( device ); }
- inline unsigned int RtAudio :: getDefaultInputDevice( void ) throw() { return rtapi_->getDefaultInputDevice(); }
- inline unsigned int RtAudio :: getDefaultOutputDevice( void ) throw() { return rtapi_->getDefaultOutputDevice(); }
- inline void RtAudio :: closeStream( void ) throw() { return rtapi_->closeStream(); }
- inline void RtAudio :: startStream( void ) { return rtapi_->startStream(); }
- inline void RtAudio :: stopStream( void ) { return rtapi_->stopStream(); }
- inline void RtAudio :: abortStream( void ) { return rtapi_->abortStream(); }
- inline bool RtAudio :: isStreamOpen( void ) const throw() { return rtapi_->isStreamOpen(); }
- inline bool RtAudio :: isStreamRunning( void ) const throw() { return rtapi_->isStreamRunning(); }
- inline long RtAudio :: getStreamLatency( void ) { return rtapi_->getStreamLatency(); }
- inline unsigned int RtAudio :: getStreamSampleRate( void ) { return rtapi_->getStreamSampleRate(); }
- inline double RtAudio :: getStreamTime( void ) { return rtapi_->getStreamTime(); }
- inline void RtAudio :: setStreamTime( double time ) { return rtapi_->setStreamTime( time ); }
- inline void RtAudio :: showWarnings( bool value ) throw() { rtapi_->showWarnings( value ); }
- #if defined(__MACOSX_CORE__)
- #include <CoreAudio/AudioHardware.h>
- class RtApiCore: public RtApi
- {
- public:
- RtApiCore();
- ~RtApiCore();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::MACOSX_CORE; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- unsigned int getDefaultOutputDevice( void );
- unsigned int getDefaultInputDevice( void );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
-
-
-
- bool callbackEvent( AudioDeviceID deviceId,
- const AudioBufferList *inBufferList,
- const AudioBufferList *outBufferList );
- private:
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- static const char* getErrorCode( OSStatus code );
- };
- #endif
- #if defined(__UNIX_JACK__)
- class RtApiJack: public RtApi
- {
- public:
- RtApiJack();
- ~RtApiJack();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::UNIX_JACK; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
-
-
-
- bool callbackEvent( unsigned long nframes );
- private:
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- };
- #endif
- #if defined(__WINDOWS_ASIO__)
- class RtApiAsio: public RtApi
- {
- public:
- RtApiAsio();
- ~RtApiAsio();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_ASIO; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
-
-
-
- bool callbackEvent( long bufferIndex );
- private:
- std::vector<RtAudio::DeviceInfo> devices_;
- void saveDeviceInfo( void );
- bool coInitialized_;
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- };
- #endif
- #if defined(__WINDOWS_DS__)
- class RtApiDs: public RtApi
- {
- public:
- RtApiDs();
- ~RtApiDs();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_DS; }
- unsigned int getDeviceCount( void );
- unsigned int getDefaultOutputDevice( void );
- unsigned int getDefaultInputDevice( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- long getStreamLatency( void );
-
-
-
-
- void callbackEvent( void );
- private:
- bool coInitialized_;
- bool buffersRolling;
- long duplexPrerollBytes;
- std::vector<struct DsDevice> dsDevices;
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- };
- #endif
- #if defined(__WINDOWS_WASAPI__)
- struct IMMDeviceEnumerator;
- class RtApiWasapi : public RtApi
- {
- public:
- RtApiWasapi();
- ~RtApiWasapi();
- RtAudio::Api getCurrentApi( void ) { return RtAudio::WINDOWS_WASAPI; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- unsigned int getDefaultOutputDevice( void );
- unsigned int getDefaultInputDevice( void );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
- private:
- bool coInitialized_;
- IMMDeviceEnumerator* deviceEnumerator_;
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int* bufferSize,
- RtAudio::StreamOptions* options );
- static DWORD WINAPI runWasapiThread( void* wasapiPtr );
- static DWORD WINAPI stopWasapiThread( void* wasapiPtr );
- static DWORD WINAPI abortWasapiThread( void* wasapiPtr );
- void wasapiThread();
- };
- #endif
- #if defined(__LINUX_ALSA__)
- class RtApiAlsa: public RtApi
- {
- public:
- RtApiAlsa();
- ~RtApiAlsa();
- RtAudio::Api getCurrentApi() { return RtAudio::LINUX_ALSA; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
-
-
-
-
- void callbackEvent( void );
- private:
- std::vector<RtAudio::DeviceInfo> devices_;
- void saveDeviceInfo( void );
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- };
- #endif
- #if defined(__LINUX_PULSE__)
- class RtApiPulse: public RtApi
- {
- public:
- ~RtApiPulse();
- RtAudio::Api getCurrentApi() { return RtAudio::LINUX_PULSE; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
-
-
-
-
- void callbackEvent( void );
- private:
- std::vector<RtAudio::DeviceInfo> devices_;
- void saveDeviceInfo( void );
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- };
- #endif
- #if defined(__LINUX_OSS__)
- class RtApiOss: public RtApi
- {
- public:
- RtApiOss();
- ~RtApiOss();
- RtAudio::Api getCurrentApi() { return RtAudio::LINUX_OSS; }
- unsigned int getDeviceCount( void );
- RtAudio::DeviceInfo getDeviceInfo( unsigned int device );
- void closeStream( void );
- void startStream( void );
- void stopStream( void );
- void abortStream( void );
-
-
-
-
- void callbackEvent( void );
- private:
- bool probeDeviceOpen( unsigned int device, StreamMode mode, unsigned int channels,
- unsigned int firstChannel, unsigned int sampleRate,
- RtAudioFormat format, unsigned int *bufferSize,
- RtAudio::StreamOptions *options );
- };
- #endif
- #if defined(__RTAUDIO_DUMMY__)
- class RtApiDummy: public RtApi
- {
- public:
- RtApiDummy() { errorText_ = "RtApiDummy: This class provides no functionality."; error( RtAudioError::WARNING ); }
- RtAudio::Api getCurrentApi( void ) { return RtAudio::RTAUDIO_DUMMY; }
- unsigned int getDeviceCount( void ) { return 0; }
- RtAudio::DeviceInfo getDeviceInfo( unsigned int ) { RtAudio::DeviceInfo info; return info; }
- void closeStream( void ) {}
- void startStream( void ) {}
- void stopStream( void ) {}
- void abortStream( void ) {}
- private:
- bool probeDeviceOpen( unsigned int , StreamMode , unsigned int ,
- unsigned int , unsigned int ,
- RtAudioFormat , unsigned int * ,
- RtAudio::StreamOptions * ) { return false; }
- };
- #endif
- #endif
- #endif
|