@@ -1,16 +1,16 @@ | |||
/************************************************************************/ | |||
/*! \class RtAudio | |||
\brief Realtime audio i/o C++ class. | |||
\brief Realtime audio i/o C++ classes. | |||
RtAudio provides a common API (Application Programming Interface) | |||
for realtime audio input/output across Linux (native ALSA and | |||
OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound | |||
and ASIO) operating systems. | |||
for realtime audio input/output across Linux (native ALSA, Jack, | |||
and OSS), SGI, Macintosh OS X (CoreAudio), and Windows | |||
(DirectSound and ASIO) operating systems. | |||
RtAudio WWW site: http://www-ccrma.stanford.edu/~gary/rtaudio/ | |||
RtAudio WWW site: http://music.mcgill.ca/~gary/rtaudio/ | |||
RtAudio: a realtime audio i/o C++ class | |||
Copyright (c) 2001-2002 Gary P. Scavone | |||
Copyright (c) 2001-2004 Gary P. Scavone | |||
Permission is hereby granted, free of charge, to any person | |||
obtaining a copy of this software and associated documentation files | |||
@@ -37,206 +37,302 @@ | |||
*/ | |||
/************************************************************************/ | |||
#if !defined(__RTAUDIO_H) | |||
// RtAudio: Version 3.0, 11 March 2004 | |||
#ifndef __RTAUDIO_H | |||
#define __RTAUDIO_H | |||
#include <map> | |||
#include "RtError.h" | |||
#include <string> | |||
#include <vector> | |||
#if defined(__LINUX_ALSA__) | |||
#include <alsa/asoundlib.h> | |||
#include <pthread.h> | |||
#include <unistd.h> | |||
// Operating system dependent thread functionality. | |||
#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) | |||
#include <windows.h> | |||
#include <process.h> | |||
typedef snd_pcm_t *AUDIO_HANDLE; | |||
typedef int DEVICE_ID; | |||
typedef pthread_t THREAD_HANDLE; | |||
typedef pthread_mutex_t MUTEX; | |||
typedef unsigned long ThreadHandle; | |||
typedef CRITICAL_SECTION StreamMutex; | |||
#elif defined(__LINUX_OSS__) | |||
#else // Various unix flavors with pthread support. | |||
#include <pthread.h> | |||
#include <unistd.h> | |||
typedef int AUDIO_HANDLE; | |||
typedef int DEVICE_ID; | |||
typedef pthread_t THREAD_HANDLE; | |||
typedef pthread_mutex_t MUTEX; | |||
typedef pthread_t ThreadHandle; | |||
typedef pthread_mutex_t StreamMutex; | |||
#elif defined(__WINDOWS_DS__) | |||
#include <windows.h> | |||
#include <process.h> | |||
#endif | |||
// The following struct is used to hold the extra variables | |||
// specific to the DirectSound implementation. | |||
typedef struct { | |||
void * object; | |||
void * buffer; | |||
UINT bufferPointer; | |||
} AUDIO_HANDLE; | |||
// This global structure type is used to pass callback information | |||
// between the private RtAudio stream structure and global callback | |||
// handling functions. | |||
struct CallbackInfo { | |||
void *object; // Used as a "this" pointer. | |||
ThreadHandle thread; | |||
bool usingCallback; | |||
void *callback; | |||
void *userData; | |||
void *apiInfo; // void pointer for API specific callback information | |||
typedef LPGUID DEVICE_ID; | |||
typedef unsigned long THREAD_HANDLE; | |||
typedef CRITICAL_SECTION MUTEX; | |||
// Default constructor. | |||
CallbackInfo() | |||
:object(0), usingCallback(false), callback(0), | |||
userData(0), apiInfo(0) {} | |||
}; | |||
#elif defined(__WINDOWS_ASIO__) | |||
#include <windows.h> | |||
#include <process.h> | |||
// Support for signed integers and floats. Audio data fed to/from | |||
// the tickStream() routine is assumed to ALWAYS be in host | |||
// byte order. The internal routines will automatically take care of | |||
// any necessary byte-swapping between the host format and the | |||
// soundcard. Thus, endian-ness is not a concern in the following | |||
// format definitions. | |||
typedef unsigned long RtAudioFormat; | |||
static const RtAudioFormat RTAUDIO_SINT8 = 0x1; /*!< 8-bit signed integer. */ | |||
static const RtAudioFormat RTAUDIO_SINT16 = 0x2; /*!< 16-bit signed integer. */ | |||
static const RtAudioFormat RTAUDIO_SINT24 = 0x4; /*!< Upper 3 bytes of 32-bit signed integer. */ | |||
static const RtAudioFormat RTAUDIO_SINT32 = 0x8; /*!< 32-bit signed integer. */ | |||
static const RtAudioFormat RTAUDIO_FLOAT32 = 0x10; /*!< Normalized between plus/minus 1.0. */ | |||
static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; /*!< Normalized between plus/minus 1.0. */ | |||
typedef int (*RtAudioCallback)(char *buffer, int bufferSize, void *userData); | |||
//! The public device information structure for returning queried values. | |||
struct RtAudioDeviceInfo { | |||
std::string name; /*!< Character string device identifier. */ | |||
bool probed; /*!< true if the device capabilities were successfully probed. */ | |||
int outputChannels; /*!< Maximum output channels supported by device. */ | |||
int inputChannels; /*!< Maximum input channels supported by device. */ | |||
int duplexChannels; /*!< Maximum simultaneous input/output channels supported by device. */ | |||
bool isDefault; /*!< true if this is the default output or input device. */ | |||
std::vector<int> sampleRates; /*!< Supported sample rates (queried from list of standard rates). */ | |||
RtAudioFormat nativeFormats; /*!< Bit mask of supported data formats. */ | |||
// Default constructor. | |||
RtAudioDeviceInfo() | |||
:probed(false), outputChannels(0), inputChannels(0), | |||
duplexChannels(0), isDefault(false), nativeFormats(0) {} | |||
}; | |||
typedef int AUDIO_HANDLE; | |||
typedef int DEVICE_ID; | |||
typedef unsigned long THREAD_HANDLE; | |||
typedef CRITICAL_SECTION MUTEX; | |||
// **************************************************************** // | |||
// | |||
// RtApi class declaration. | |||
// | |||
// Note that RtApi is an abstract base class and cannot be | |||
// explicitly instantiated. The class RtAudio will create an | |||
// instance of an RtApi subclass (RtApiOss, RtApiAlsa, | |||
// RtApiJack, RtApiCore, RtApiAl, RtApiDs, or RtApiAsio). | |||
// | |||
// **************************************************************** // | |||
#elif defined(__IRIX_AL__) | |||
#include <dmedia/audio.h> | |||
#include <pthread.h> | |||
#include <unistd.h> | |||
class RtApi | |||
{ | |||
public: | |||
typedef ALport AUDIO_HANDLE; | |||
typedef long DEVICE_ID; | |||
typedef pthread_t THREAD_HANDLE; | |||
typedef pthread_mutex_t MUTEX; | |||
RtApi(); | |||
virtual ~RtApi(); | |||
void openStream( int outputDevice, int outputChannels, | |||
int inputDevice, int inputChannels, | |||
RtAudioFormat format, int sampleRate, | |||
int *bufferSize, int numberOfBuffers ); | |||
virtual void setStreamCallback( RtAudioCallback callback, void *userData ) = 0; | |||
virtual void cancelStreamCallback() = 0; | |||
int getDeviceCount(void); | |||
RtAudioDeviceInfo getDeviceInfo( int device ); | |||
char * const getStreamBuffer(); | |||
virtual void tickStream() = 0; | |||
virtual void closeStream(); | |||
virtual void startStream() = 0; | |||
virtual void stopStream() = 0; | |||
virtual void abortStream() = 0; | |||
#elif defined(__MACOSX_CORE__) | |||
protected: | |||
#include <CoreAudio/AudioHardware.h> | |||
#include <pthread.h> | |||
static const unsigned int MAX_SAMPLE_RATES; | |||
static const unsigned int SAMPLE_RATES[]; | |||
typedef unsigned int AUDIO_HANDLE; | |||
typedef AudioDeviceID DEVICE_ID; | |||
typedef pthread_t THREAD_HANDLE; | |||
typedef pthread_mutex_t MUTEX; | |||
enum { FAILURE, SUCCESS }; | |||
#endif | |||
enum StreamMode { | |||
OUTPUT, | |||
INPUT, | |||
DUPLEX, | |||
UNINITIALIZED = -75 | |||
}; | |||
enum StreamState { | |||
STREAM_STOPPED, | |||
STREAM_RUNNING | |||
}; | |||
/************************************************************************/ | |||
/*! \class RtError | |||
\brief Exception handling class for RtAudio. | |||
The RtError class is quite simple but it does allow errors to be | |||
"caught" by RtError::TYPE. Almost all RtAudio methods can "throw" | |||
an RtError, most typically if an invalid stream identifier is | |||
supplied to a method or a driver error occurs. There are a number | |||
of cases within RtAudio where warning messages may be displayed | |||
but an exception is not thrown. There is a private RtAudio method, | |||
error(), which can be modified to globally control how these | |||
messages are handled and reported. | |||
*/ | |||
/************************************************************************/ | |||
// A protected structure for audio streams. | |||
struct RtApiStream { | |||
int device[2]; // Playback and record, respectively. | |||
void *apiHandle; // void pointer for API specific stream handle information | |||
StreamMode mode; // OUTPUT, INPUT, or DUPLEX. | |||
StreamState state; // STOPPED or RUNNING | |||
char *userBuffer; | |||
char *deviceBuffer; | |||
bool doConvertBuffer[2]; // Playback and record, respectively. | |||
bool deInterleave[2]; // Playback and record, respectively. | |||
bool doByteSwap[2]; // Playback and record, respectively. | |||
int sampleRate; | |||
int bufferSize; | |||
int nBuffers; | |||
int nUserChannels[2]; // Playback and record, respectively. | |||
int nDeviceChannels[2]; // Playback and record channels, respectively. | |||
RtAudioFormat userFormat; | |||
RtAudioFormat deviceFormat[2]; // Playback and record, respectively. | |||
StreamMutex mutex; | |||
CallbackInfo callbackInfo; | |||
RtApiStream() | |||
:apiHandle(0), userBuffer(0), deviceBuffer(0) {} | |||
// :apiHandle(0), mode(UNINITIALIZED), state(STREAM_STOPPED), | |||
// userBuffer(0), deviceBuffer(0) {} | |||
}; | |||
class RtError | |||
{ | |||
public: | |||
//! Defined RtError types. | |||
enum TYPE { | |||
WARNING, | |||
DEBUG_WARNING, | |||
UNSPECIFIED, | |||
NO_DEVICES_FOUND, | |||
INVALID_DEVICE, | |||
INVALID_STREAM, | |||
MEMORY_ERROR, | |||
INVALID_PARAMETER, | |||
DRIVER_ERROR, | |||
SYSTEM_ERROR, | |||
THREAD_ERROR | |||
// A protected device structure for audio devices. | |||
struct RtApiDevice { | |||
std::string name; /*!< Character string device identifier. */ | |||
bool probed; /*!< true if the device capabilities were successfully probed. */ | |||
void *apiDeviceId; // void pointer for API specific device information | |||
int maxOutputChannels; /*!< Maximum output channels supported by device. */ | |||
int maxInputChannels; /*!< Maximum input channels supported by device. */ | |||
int maxDuplexChannels; /*!< Maximum simultaneous input/output channels supported by device. */ | |||
int minOutputChannels; /*!< Minimum output channels supported by device. */ | |||
int minInputChannels; /*!< Minimum input channels supported by device. */ | |||
int minDuplexChannels; /*!< Minimum simultaneous input/output channels supported by device. */ | |||
bool hasDuplexSupport; /*!< true if device supports duplex mode. */ | |||
bool isDefault; /*!< true if this is the default output or input device. */ | |||
std::vector<int> sampleRates; /*!< Supported sample rates. */ | |||
RtAudioFormat nativeFormats; /*!< Bit mask of supported data formats. */ | |||
// Default constructor. | |||
RtApiDevice() | |||
:probed(false), apiDeviceId(0), maxOutputChannels(0), maxInputChannels(0), | |||
maxDuplexChannels(0), minOutputChannels(0), minInputChannels(0), | |||
minDuplexChannels(0), isDefault(false), nativeFormats(0) {} | |||
}; | |||
protected: | |||
char error_message[256]; | |||
TYPE type; | |||
typedef signed short Int16; | |||
typedef signed int Int32; | |||
typedef float Float32; | |||
typedef double Float64; | |||
public: | |||
//! The constructor. | |||
RtError(const char *p, TYPE tipe = RtError::UNSPECIFIED); | |||
char message_[256]; | |||
int nDevices_; | |||
std::vector<RtApiDevice> devices_; | |||
RtApiStream stream_; | |||
//! The destructor. | |||
virtual ~RtError(void); | |||
/*! | |||
Protected, api-specific method to count and identify the system | |||
audio devices. This function MUST be implemented by all subclasses. | |||
*/ | |||
virtual void initialize(void) = 0; | |||
//! Prints "thrown" error message to stdout. | |||
virtual void printMessage(void); | |||
/*! | |||
Protected, api-specific method which attempts to fill an | |||
RtAudioDevice structure for a given device. This function MUST be | |||
implemented by all subclasses. If an error is encountered during | |||
the probe, a "warning" message is reported and the value of | |||
"probed" remains false (no exception is thrown). A successful | |||
probe is indicated by probed = true. | |||
*/ | |||
virtual void probeDeviceInfo( RtApiDevice *info ); | |||
//! Returns the "thrown" error message TYPE. | |||
virtual const TYPE& getType(void) { return type; } | |||
/*! | |||
Protected, api-specific method which attempts to open a device | |||
with the given parameters. This function MUST be implemented by | |||
all subclasses. If an error is encountered during the probe, a | |||
"warning" message is reported and FAILURE is returned (no | |||
exception is thrown). A successful probe is indicated by a return | |||
value of SUCCESS. | |||
*/ | |||
virtual bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
//! Returns the "thrown" error message string. | |||
virtual const char *getMessage(void) { return error_message; } | |||
}; | |||
/*! | |||
Protected method which returns the index in the devices array to | |||
the default input device. | |||
*/ | |||
virtual int getDefaultInputDevice(void); | |||
/*! | |||
Protected method which returns the index in the devices array to | |||
the default output device. | |||
*/ | |||
virtual int getDefaultOutputDevice(void); | |||
//! Protected common method to clear an RtApiDevice structure. | |||
void clearDeviceInfo( RtApiDevice *info ); | |||
// This public structure type is used to pass callback information | |||
// between the private RtAudio stream structure and global callback | |||
// handling functions. | |||
typedef struct { | |||
void *object; // Used as a "this" pointer. | |||
int streamId; | |||
DEVICE_ID device[2]; | |||
THREAD_HANDLE thread; | |||
void *callback; | |||
void *buffers; | |||
unsigned long waitTime; | |||
bool blockTick; | |||
bool stopStream; | |||
bool usingCallback; | |||
void *userData; | |||
} CALLBACK_INFO; | |||
//! Protected common method to clear an RtApiStream structure. | |||
void clearStreamInfo(); | |||
//! Protected common error method to allow global control over error handling. | |||
void error( RtError::Type type ); | |||
// *************************************************** // | |||
/*! | |||
Protected common method used to check whether a stream is open. | |||
If not, an "invalid identifier" exception is thrown. | |||
*/ | |||
void verifyStream(); | |||
/*! | |||
Protected method used to perform format, channel number, and/or interleaving | |||
conversions between the user and device buffers. | |||
*/ | |||
void convertStreamBuffer( StreamMode mode ); | |||
//! Protected common method used to perform byte-swapping on buffers. | |||
void byteSwapBuffer( char *buffer, int samples, RtAudioFormat format ); | |||
//! Protected common method which returns the number of bytes for a given format. | |||
int formatBytes( RtAudioFormat format ); | |||
}; | |||
// **************************************************************** // | |||
// | |||
// RtAudio class declaration. | |||
// | |||
// *************************************************** // | |||
// RtAudio is a "controller" used to select an available audio i/o | |||
// interface. It presents a common API for the user to call but all | |||
// functionality is implemented by the class RtAudioApi and its | |||
// subclasses. RtAudio creates an instance of an RtAudioApi subclass | |||
// based on the user's API choice. If no choice is made, RtAudio | |||
// attempts to make a "logical" API selection. | |||
// | |||
// **************************************************************** // | |||
class RtAudio | |||
{ | |||
public: | |||
// Support for signed integers and floats. Audio data fed to/from | |||
// the tickStream() routine is assumed to ALWAYS be in host | |||
// byte order. The internal routines will automatically take care of | |||
// any necessary byte-swapping between the host format and the | |||
// soundcard. Thus, endian-ness is not a concern in the following | |||
// format definitions. | |||
typedef unsigned long RTAUDIO_FORMAT; | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT8; /*!< 8-bit signed integer. */ | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT16; /*!< 16-bit signed integer. */ | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT24; /*!< Upper 3 bytes of 32-bit signed integer. */ | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT32; /*!< 32-bit signed integer. */ | |||
static const RTAUDIO_FORMAT RTAUDIO_FLOAT32; /*!< Normalized between plus/minus 1.0. */ | |||
static const RTAUDIO_FORMAT RTAUDIO_FLOAT64; /*!< Normalized between plus/minus 1.0. */ | |||
//static const int MAX_SAMPLE_RATES = 14; | |||
enum { MAX_SAMPLE_RATES = 14 }; | |||
typedef int (*RTAUDIO_CALLBACK)(char *buffer, int bufferSize, void *userData); | |||
//! The public device information structure for passing queried values. | |||
typedef struct { | |||
char name[128]; /*!< Character string device identifier. */ | |||
DEVICE_ID id[2]; /* No value reported by getDeviceInfo(). */ | |||
bool probed; /*!< true if the device capabilities were successfully probed. */ | |||
int maxOutputChannels; /*!< Maximum output channels supported by device. */ | |||
int maxInputChannels; /*!< Maximum input channels supported by device. */ | |||
int maxDuplexChannels; /*!< Maximum simultaneous input/output channels supported by device. */ | |||
int minOutputChannels; /*!< Minimum output channels supported by device. */ | |||
int minInputChannels; /*!< Minimum input channels supported by device. */ | |||
int minDuplexChannels; /*!< Minimum simultaneous input/output channels supported by device. */ | |||
bool hasDuplexSupport; /*!< true if device supports duplex mode. */ | |||
bool isDefault; /*!< true if this is the default output or input device. */ | |||
int nSampleRates; /*!< Number of discrete rates or -1 if range supported. */ | |||
int sampleRates[MAX_SAMPLE_RATES]; /*!< Supported rates or (min, max) if range. */ | |||
RTAUDIO_FORMAT nativeFormats; /*!< Bit mask of supported data formats. */ | |||
} RTAUDIO_DEVICE; | |||
//! Audio API specifier arguments. | |||
enum RtAudioApi { | |||
UNSPECIFIED, /*!< Search for a working compiled API. */ | |||
LINUX_ALSA, /*!< The Advanced Linux Sound Architecture API. */ | |||
LINUX_OSS, /*!< The Linux Open Sound System API. */ | |||
LINUX_JACK, /*!< The Linux Jack Low-Latency Audio Server API. */ | |||
MACOSX_CORE, /*!< Macintosh OS-X Core Audio API. */ | |||
IRIX_AL, /*!< The Irix Audio Library API. */ | |||
WINDOWS_ASIO, /*!< The Steinberg Audio Stream I/O API. */ | |||
WINDOWS_DS /*!< The Microsoft Direct Sound API. */ | |||
}; | |||
//! The default constructor. | |||
//! The default class constructor. | |||
/*! | |||
Probes the system to make sure at least one audio input/output | |||
device is available and determines the api-specific identifier for | |||
each device found. An RtError error can be thrown if no devices | |||
are found or if a memory allocation error occurs. | |||
If no API argument is specified and multiple API support has been | |||
compiled, the default order of use is JACK, ALSA, OSS (Linux | |||
systems) and ASIO, DS (Windows systems). | |||
*/ | |||
RtAudio(); | |||
RtAudio( RtAudioApi api=UNSPECIFIED ); | |||
//! A constructor which can be used to open a stream during instantiation. | |||
/*! | |||
@@ -250,23 +346,21 @@ public: | |||
for the given parameters, if a memory allocation error occurs, or | |||
if a driver error occurs. \sa openStream() | |||
*/ | |||
RtAudio(int *streamId, | |||
int outputDevice, int outputChannels, | |||
int inputDevice, int inputChannels, | |||
RTAUDIO_FORMAT format, int sampleRate, | |||
int *bufferSize, int numberOfBuffers); | |||
RtAudio( int outputDevice, int outputChannels, | |||
int inputDevice, int inputChannels, | |||
RtAudioFormat format, int sampleRate, | |||
int *bufferSize, int numberOfBuffers, RtAudioApi api=UNSPECIFIED ); | |||
//! The destructor. | |||
/*! | |||
Stops and closes any open streams and devices and deallocates | |||
Stops and closes an open stream and devices and deallocates | |||
buffer and structure memory. | |||
*/ | |||
~RtAudio(); | |||
//! A public method for opening a stream with the specified parameters. | |||
/*! | |||
If successful, the opened stream ID is returned. Otherwise, an | |||
RtError is thrown. | |||
An RtError is thrown if a stream cannot be opened. | |||
\param outputDevice: If equal to 0, the default or first device | |||
found meeting the given parameters is opened. Otherwise, the | |||
@@ -280,7 +374,7 @@ public: | |||
the getDeviceInfo() method. | |||
\param inputChannels: The desired number of input channels. If | |||
equal to zero, the inputDevice identifier is ignored. | |||
\param format: An RTAUDIO_FORMAT specifying the desired sample data format. | |||
\param format: An RtAudioFormat specifying the desired sample data format. | |||
\param sampleRate: The desired sample rate (sample frames per second). | |||
\param *bufferSize: A pointer value indicating the desired internal buffer | |||
size in sample frames. The actual value used by the device is | |||
@@ -291,47 +385,47 @@ public: | |||
though at a cost of greater latency. A value of zero can be | |||
specified, in which case the lowest allowable value is used. | |||
*/ | |||
int openStream(int outputDevice, int outputChannels, | |||
int inputDevice, int inputChannels, | |||
RTAUDIO_FORMAT format, int sampleRate, | |||
int *bufferSize, int numberOfBuffers); | |||
void openStream( int outputDevice, int outputChannels, | |||
int inputDevice, int inputChannels, | |||
RtAudioFormat format, int sampleRate, | |||
int *bufferSize, int numberOfBuffers ); | |||
//! A public method which sets a user-defined callback function for a given stream. | |||
/*! | |||
This method assigns a callback function to a specific, | |||
previously opened stream for non-blocking stream functionality. A | |||
separate process is initiated, though the user function is called | |||
only when the stream is "running" (between calls to the | |||
startStream() and stopStream() methods, respectively). The | |||
callback process remains active for the duration of the stream and | |||
is automatically shutdown when the stream is closed (via the | |||
closeStream() method or by object destruction). The callback | |||
process can also be shutdown and the user function de-referenced | |||
through an explicit call to the cancelStreamCallback() method. | |||
Note that a single stream can use only blocking or callback | |||
functionality at the same time, though it is possible to alternate | |||
modes on the same stream through the use of the | |||
setStreamCallback() and cancelStreamCallback() methods (the | |||
blocking tickStream() method can be used before a callback is set | |||
and/or after a callback is cancelled). An RtError will be thrown | |||
for an invalid device argument. | |||
This method assigns a callback function to a previously opened | |||
stream for non-blocking stream functionality. A separate process | |||
is initiated, though the user function is called only when the | |||
stream is "running" (between calls to the startStream() and | |||
stopStream() methods, respectively). The callback process remains | |||
active for the duration of the stream and is automatically | |||
shutdown when the stream is closed (via the closeStream() method | |||
or by object destruction). The callback process can also be | |||
shutdown and the user function de-referenced through an explicit | |||
call to the cancelStreamCallback() method. Note that the stream | |||
can use only blocking or callback functionality at a particular | |||
time, though it is possible to alternate modes on the same stream | |||
through the use of the setStreamCallback() and | |||
cancelStreamCallback() methods (the blocking tickStream() method | |||
can be used before a callback is set and/or after a callback is | |||
cancelled). An RtError will be thrown if called when no stream is | |||
open or a thread errors occurs. | |||
*/ | |||
void setStreamCallback(int streamId, RTAUDIO_CALLBACK callback, void *userData); | |||
void setStreamCallback(RtAudioCallback callback, void *userData) { rtapi_->setStreamCallback( callback, userData ); }; | |||
//! A public method which cancels a callback process and function for a given stream. | |||
//! A public method which cancels a callback process and function for the stream. | |||
/*! | |||
This method shuts down a callback process and de-references the | |||
user function for a specific stream. Callback functionality can | |||
user function for the stream. Callback functionality can | |||
subsequently be restarted on the stream via the | |||
setStreamCallback() method. An RtError will be thrown for an | |||
invalid device argument. | |||
setStreamCallback() method. An RtError will be thrown if called | |||
when no stream is open. | |||
*/ | |||
void cancelStreamCallback(int streamId); | |||
void cancelStreamCallback() { rtapi_->cancelStreamCallback(); }; | |||
//! A public method which returns the number of audio devices found. | |||
int getDeviceCount(void); | |||
int getDeviceCount(void) { return rtapi_->getDeviceCount(); }; | |||
//! Fill a user-supplied RTAUDIO_DEVICE structure for a specified device number. | |||
//! Return an RtAudioDeviceInfo structure for a specified device number. | |||
/*! | |||
Any device integer between 1 and getDeviceCount() is valid. If | |||
a device is busy or otherwise unavailable, the structure member | |||
@@ -340,185 +434,281 @@ public: | |||
or output device, the "isDefault" member will have a value of | |||
"true". An RtError will be thrown for an invalid device argument. | |||
*/ | |||
void getDeviceInfo(int device, RTAUDIO_DEVICE *info); | |||
RtAudioDeviceInfo getDeviceInfo(int device) { return rtapi_->getDeviceInfo( device ); }; | |||
//! A public method which returns a pointer to the buffer for an open stream. | |||
/*! | |||
The user should fill and/or read the buffer data in interleaved format | |||
and then call the tickStream() method. An RtError will be | |||
thrown for an invalid stream identifier. | |||
thrown if called when no stream is open. | |||
*/ | |||
char * const getStreamBuffer(int streamId); | |||
char * const getStreamBuffer() { return rtapi_->getStreamBuffer(); }; | |||
//! Public method used to trigger processing of input/output data for a stream. | |||
/*! | |||
This method blocks until all buffer data is read/written. An | |||
RtError will be thrown for an invalid stream identifier or if | |||
a driver error occurs. | |||
RtError will be thrown if a driver error occurs or if called when | |||
no stream is open. | |||
*/ | |||
void tickStream(int streamId); | |||
void tickStream() { rtapi_->tickStream(); }; | |||
//! Public method which closes a stream and frees any associated buffers. | |||
/*! | |||
If an invalid stream identifier is specified, this method | |||
issues a warning and returns (an RtError is not thrown). | |||
If a stream is not open, this method issues a warning and | |||
returns (an RtError is not thrown). | |||
*/ | |||
void closeStream(int streamId); | |||
void closeStream() { rtapi_->closeStream(); }; | |||
//! Public method which starts a stream. | |||
/*! | |||
An RtError will be thrown for an invalid stream identifier | |||
or if a driver error occurs. | |||
An RtError will be thrown if a driver error occurs or if called | |||
when no stream is open. | |||
*/ | |||
void startStream(int streamId); | |||
void startStream() { rtapi_->startStream(); }; | |||
//! Stop a stream, allowing any samples remaining in the queue to be played out and/or read in. | |||
/*! | |||
An RtError will be thrown for an invalid stream identifier | |||
or if a driver error occurs. | |||
An RtError will be thrown if a driver error occurs or if called | |||
when no stream is open. | |||
*/ | |||
void stopStream(int streamId); | |||
void stopStream() { rtapi_->stopStream(); }; | |||
//! Stop a stream, discarding any samples remaining in the input/output queue. | |||
/*! | |||
An RtError will be thrown for an invalid stream identifier | |||
or if a driver error occurs. | |||
An RtError will be thrown if a driver error occurs or if called | |||
when no stream is open. | |||
*/ | |||
void abortStream(int streamId); | |||
void abortStream() { rtapi_->abortStream(); }; | |||
//! Queries a stream to determine whether a call to the tickStream() method will block. | |||
/*! | |||
A return value of 0 indicates that the stream will NOT block. A positive | |||
return value indicates the number of sample frames that cannot yet be | |||
processed without blocking. | |||
*/ | |||
int streamWillBlock(int streamId); | |||
#if (defined(__MACOSX_CORE__) || defined(__WINDOWS_ASIO__)) | |||
protected: | |||
void initialize( RtAudioApi api ); | |||
RtApi *rtapi_; | |||
}; | |||
// RtApi Subclass prototypes. | |||
#if defined(__LINUX_ALSA__) | |||
class RtApiAlsa: public RtApi | |||
{ | |||
public: | |||
RtApiAlsa(); | |||
~RtApiAlsa(); | |||
void tickStream(); | |||
void closeStream(); | |||
void startStream(); | |||
void stopStream(); | |||
void abortStream(); | |||
int streamWillBlock(); | |||
void setStreamCallback( RtAudioCallback callback, void *userData ); | |||
void cancelStreamCallback(); | |||
private: | |||
void initialize(void); | |||
void probeDeviceInfo( RtApiDevice *info ); | |||
bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
}; | |||
#endif | |||
#if defined(__LINUX_JACK__) | |||
class RtApiJack: public RtApi | |||
{ | |||
public: | |||
RtApiJack(); | |||
~RtApiJack(); | |||
void tickStream(); | |||
void closeStream(); | |||
void startStream(); | |||
void stopStream(); | |||
void abortStream(); | |||
void setStreamCallback( RtAudioCallback callback, void *userData ); | |||
void cancelStreamCallback(); | |||
// This function is intended for internal use only. It must be | |||
// public because it is called by the internal callback handler, | |||
// which is not a member of RtAudio. External use of this function | |||
// will most likely produce highly undesireable results! | |||
void callbackEvent(int streamId, DEVICE_ID deviceId, void *inData, void *outData); | |||
void callbackEvent( unsigned long nframes ); | |||
private: | |||
void initialize(void); | |||
void probeDeviceInfo( RtApiDevice *info ); | |||
bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
}; | |||
#endif | |||
protected: | |||
#if defined(__LINUX_OSS__) | |||
private: | |||
class RtApiOss: public RtApi | |||
{ | |||
public: | |||
static const unsigned int SAMPLE_RATES[MAX_SAMPLE_RATES]; | |||
RtApiOss(); | |||
~RtApiOss(); | |||
void tickStream(); | |||
void closeStream(); | |||
void startStream(); | |||
void stopStream(); | |||
void abortStream(); | |||
int streamWillBlock(); | |||
void setStreamCallback( RtAudioCallback callback, void *userData ); | |||
void cancelStreamCallback(); | |||
enum { FAILURE, SUCCESS }; | |||
private: | |||
enum STREAM_MODE { | |||
OUTPUT, | |||
INPUT, | |||
DUPLEX, | |||
UNINITIALIZED = -75 | |||
}; | |||
void initialize(void); | |||
void probeDeviceInfo( RtApiDevice *info ); | |||
bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
}; | |||
enum STREAM_STATE { | |||
STREAM_STOPPED, | |||
STREAM_RUNNING | |||
}; | |||
#endif | |||
typedef struct { | |||
int device[2]; // Playback and record, respectively. | |||
STREAM_MODE mode; // OUTPUT, INPUT, or DUPLEX. | |||
AUDIO_HANDLE handle[2]; // Playback and record handles, respectively. | |||
STREAM_STATE state; // STOPPED or RUNNING | |||
char *userBuffer; | |||
char *deviceBuffer; | |||
bool doConvertBuffer[2]; // Playback and record, respectively. | |||
bool deInterleave[2]; // Playback and record, respectively. | |||
bool doByteSwap[2]; // Playback and record, respectively. | |||
int sampleRate; | |||
int bufferSize; | |||
int nBuffers; | |||
int nUserChannels[2]; // Playback and record, respectively. | |||
int nDeviceChannels[2]; // Playback and record channels, respectively. | |||
RTAUDIO_FORMAT userFormat; | |||
RTAUDIO_FORMAT deviceFormat[2]; // Playback and record, respectively. | |||
MUTEX mutex; | |||
CALLBACK_INFO callbackInfo; | |||
} RTAUDIO_STREAM; | |||
#if defined(__MACOSX_CORE__) | |||
typedef signed short INT16; | |||
typedef signed int INT32; | |||
typedef float FLOAT32; | |||
typedef double FLOAT64; | |||
#include <CoreAudio/AudioHardware.h> | |||
char message[256]; | |||
int nDevices; | |||
RTAUDIO_DEVICE *devices; | |||
class RtApiCore: public RtApi | |||
{ | |||
public: | |||
std::map<int, void *> streams; | |||
RtApiCore(); | |||
~RtApiCore(); | |||
int getDefaultOutputDevice(void); | |||
int getDefaultInputDevice(void); | |||
void tickStream(); | |||
void closeStream(); | |||
void startStream(); | |||
void stopStream(); | |||
void abortStream(); | |||
void setStreamCallback( RtAudioCallback callback, void *userData ); | |||
void cancelStreamCallback(); | |||
// This function is intended for internal use only. It must be | |||
// public because it is called by the internal callback handler, | |||
// which is not a member of RtAudio. External use of this function | |||
// will most likely produce highly undesireable results! | |||
void callbackEvent( AudioDeviceID deviceId, void *inData, void *outData ); | |||
//! Private error method to allow global control over error handling. | |||
void error(RtError::TYPE type); | |||
private: | |||
/*! | |||
Private method to count the system audio devices, allocate the | |||
RTAUDIO_DEVICE structures, and probe the device capabilities. | |||
*/ | |||
void initialize(void); | |||
void probeDeviceInfo( RtApiDevice *info ); | |||
bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
}; | |||
/*! | |||
Private method which returns the index in the devices array to | |||
the default input device. | |||
*/ | |||
int getDefaultInputDevice(void); | |||
#endif | |||
/*! | |||
Private method which returns the index in the devices array to | |||
the default output device. | |||
*/ | |||
#if defined(__WINDOWS_DS__) | |||
class RtApiDs: public RtApi | |||
{ | |||
public: | |||
RtApiDs(); | |||
~RtApiDs(); | |||
int getDefaultOutputDevice(void); | |||
int getDefaultInputDevice(void); | |||
void tickStream(); | |||
void closeStream(); | |||
void startStream(); | |||
void stopStream(); | |||
void abortStream(); | |||
int streamWillBlock(); | |||
void setStreamCallback( RtAudioCallback callback, void *userData ); | |||
void cancelStreamCallback(); | |||
//! Private method to clear an RTAUDIO_DEVICE structure. | |||
void clearDeviceInfo(RTAUDIO_DEVICE *info); | |||
private: | |||
/*! | |||
Private method which attempts to fill an RTAUDIO_DEVICE | |||
structure for a given device. If an error is encountered during | |||
the probe, a "warning" message is reported and the value of | |||
"probed" remains false (no exception is thrown). A successful | |||
probe is indicated by probed = true. | |||
*/ | |||
void probeDeviceInfo(RTAUDIO_DEVICE *info); | |||
void initialize(void); | |||
void probeDeviceInfo( RtApiDevice *info ); | |||
bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
}; | |||
/*! | |||
Private method which attempts to open a device with the given parameters. | |||
If an error is encountered during the probe, a "warning" message is | |||
reported and FAILURE is returned (no exception is thrown). A | |||
successful probe is indicated by a return value of SUCCESS. | |||
*/ | |||
bool probeDeviceOpen(int device, RTAUDIO_STREAM *stream, | |||
STREAM_MODE mode, int channels, | |||
int sampleRate, RTAUDIO_FORMAT format, | |||
int *bufferSize, int numberOfBuffers); | |||
#endif | |||
/*! | |||
Private common method used to check validity of a user-passed | |||
stream ID. When the ID is valid, this method returns a pointer to | |||
an RTAUDIO_STREAM structure (in the form of a void pointer). | |||
Otherwise, an "invalid identifier" exception is thrown. | |||
*/ | |||
void *verifyStream(int streamId); | |||
#if defined(__WINDOWS_ASIO__) | |||
/*! | |||
Private method used to perform format, channel number, and/or interleaving | |||
conversions between the user and device buffers. | |||
*/ | |||
void convertStreamBuffer(RTAUDIO_STREAM *stream, STREAM_MODE mode); | |||
class RtApiAsio: public RtApi | |||
{ | |||
public: | |||
RtApiAsio(); | |||
~RtApiAsio(); | |||
void tickStream(); | |||
void closeStream(); | |||
void startStream(); | |||
void stopStream(); | |||
void abortStream(); | |||
void setStreamCallback( RtAudioCallback callback, void *userData ); | |||
void cancelStreamCallback(); | |||
// This function is intended for internal use only. It must be | |||
// public because it is called by the internal callback handler, | |||
// which is not a member of RtAudio. External use of this function | |||
// will most likely produce highly undesireable results! | |||
void callbackEvent( long bufferIndex ); | |||
private: | |||
void initialize(void); | |||
void probeDeviceInfo( RtApiDevice *info ); | |||
bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
}; | |||
#endif | |||
#if defined(__IRIX_AL__) | |||
class RtApiAl: public RtApi | |||
{ | |||
public: | |||
RtApiAl(); | |||
~RtApiAl(); | |||
int getDefaultOutputDevice(void); | |||
int getDefaultInputDevice(void); | |||
void tickStream(); | |||
void closeStream(); | |||
void startStream(); | |||
void stopStream(); | |||
void abortStream(); | |||
int streamWillBlock(); | |||
void setStreamCallback( RtAudioCallback callback, void *userData ); | |||
void cancelStreamCallback(); | |||
//! Private method used to perform byte-swapping on buffers. | |||
void byteSwapBuffer(char *buffer, int samples, RTAUDIO_FORMAT format); | |||
private: | |||
//! Private method which returns the number of bytes for a given format. | |||
int formatBytes(RTAUDIO_FORMAT format); | |||
void initialize(void); | |||
void probeDeviceInfo( RtApiDevice *info ); | |||
bool probeDeviceOpen( int device, StreamMode mode, int channels, | |||
int sampleRate, RtAudioFormat format, | |||
int *bufferSize, int numberOfBuffers ); | |||
}; | |||
#endif | |||
// Define the following flag to have extra information spewed to stderr. | |||
//#define __RTAUDIO_DEBUG__ | |||
@@ -0,0 +1,60 @@ | |||
/************************************************************************/ | |||
/*! \class RtError | |||
\brief 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. | |||
*/ | |||
/************************************************************************/ | |||
#ifndef RTERROR_H | |||
#define RTERROR_H | |||
#include <iostream> | |||
#include <string> | |||
class RtError | |||
{ | |||
public: | |||
//! Defined RtError types. | |||
enum Type { | |||
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 on system. */ | |||
INVALID_DEVICE, /*!< An invalid device ID was specified. */ | |||
INVALID_STREAM, /*!< An invalid stream ID was specified. */ | |||
MEMORY_ERROR, /*!< An error occured during memory allocation. */ | |||
INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */ | |||
DRIVER_ERROR, /*!< A system driver error occured. */ | |||
SYSTEM_ERROR, /*!< A system error occured. */ | |||
THREAD_ERROR /*!< A thread error occured. */ | |||
}; | |||
protected: | |||
std::string message_; | |||
Type type_; | |||
public: | |||
//! The constructor. | |||
RtError(const std::string& message, Type type = RtError::UNSPECIFIED) : message_(message), type_(type){} | |||
//! The destructor. | |||
virtual ~RtError(void) {}; | |||
//! Prints thrown error message to stderr. | |||
virtual void printMessage(void) { std::cerr << '\n' << message_ << "\n\n"; } | |||
//! Returns the thrown error message type. | |||
virtual const Type& getType(void) { return type_; } | |||
//! Returns the thrown error message string. | |||
virtual const std::string& getMessage(void) { return message_; } | |||
//! Returns the thrown error message as a C string. | |||
virtual const char *getMessageString(void) { return message_.c_str(); } | |||
}; | |||
#endif |
@@ -3,7 +3,7 @@ | |||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 | |||
# Free Software Foundation, Inc. | |||
timestamp='2001-04-20' | |||
timestamp='2004-02-26' | |||
# This file is free software; you can redistribute it and/or modify it | |||
# under the terms of the GNU General Public License as published by | |||
@@ -3,7 +3,7 @@ | |||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 | |||
# Free Software Foundation, Inc. | |||
timestamp='2001-04-20' | |||
timestamp='2004-02-26' | |||
# This file is (in principle) common to ALL GNU software. | |||
# The presence of a machine in this file suggests that SOME GNU software | |||
@@ -1,11 +1,14 @@ | |||
# Process this file with autoconf to produce a configure script. | |||
AC_INIT(RtAudio, 2.1, gary@ccrma.stanford.edu, rtaudio) | |||
AC_INIT(RtAudio, 3.0, gary@ccrma.stanford.edu, rtaudio) | |||
AC_CONFIG_SRCDIR(RtAudio.cpp) | |||
AC_CONFIG_FILES(tests/Makefile) | |||
# Fill GXX with something before test. | |||
AC_SUBST( GXX, ["no"] ) | |||
# Checks for programs. | |||
AC_PROG_CC | |||
AC_PROG_CXX(CC g++ c++ cxx) | |||
AC_PROG_CXX(g++ CC c++ cxx) | |||
# Checks for libraries. | |||
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!)) | |||
@@ -25,7 +28,7 @@ AC_ARG_ENABLE(debug, | |||
[AC_SUBST( debug, [] ) AC_SUBST( cflags, [-O2] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)]) | |||
# Check compiler and use -Wall if gnu. | |||
if test $GXX = "yes" ; then | |||
if [test $GXX = "yes" ;] then | |||
AC_SUBST( warn, [-Wall] ) | |||
fi | |||
@@ -34,15 +37,39 @@ AC_CANONICAL_HOST | |||
AC_MSG_CHECKING(for audio API) | |||
case $host in | |||
*-*-linux*) | |||
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)], [AC_SUBST( sound_api, [-D__LINUX_ALSA__] ) AC_MSG_RESULT(using ALSA) ], [AC_SUBST( sound_api, [-D__LINUX_OSS__] ) AC_MSG_RESULT(using OSS)]) | |||
AC_SUBST( sound_api, [_NO_API_] ) | |||
AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (linux only)], [AC_SUBST( sound_api, [-D__LINUX_JACK__] ) AC_MSG_RESULT(using JACK)], ) | |||
if [test $sound_api = -D__LINUX_JACK__;] then | |||
TEMP_LIBS=$LIBS | |||
AC_CHECK_LIB(jack, jack_client_new, , AC_MSG_ERROR(JACK support requires the jack library!)) | |||
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(Jack support also requires the asound library!)) | |||
LIBS="`pkg-config --cflags --libs jack` $TEMP_LIBS -lasound" | |||
audio_apis="-D__LINUX_JACK__" | |||
fi | |||
if test $sound_api = -D__LINUX_ALSA__; then | |||
# Look for Alsa flag | |||
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)], [AC_SUBST( sound_api, [-D__LINUX_ALSA__] ) AC_MSG_RESULT(using ALSA)], ) | |||
if [test $sound_api = -D__LINUX_ALSA__;] then | |||
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!)) | |||
audio_apis="-D__LINUX_ALSA__ $audio_apis" | |||
fi | |||
# Look for OSS flag | |||
AC_ARG_WITH(oss, [ --with-oss = choose OSS API support (linux only)], [AC_SUBST( sound_api, [-D__LINUX_OSS__] ) AC_MSG_RESULT(using OSS)], ) | |||
if test $sound_api = -D__LINUX_OSS__; then | |||
audio_apis="-D__LINUX_OSS__ $audio_apis" | |||
fi | |||
# If no audio api flags specified, use OSS | |||
if [test $sound_api = _NO_API_;] then | |||
AC_SUBST( sound_api, [-D__LINUX_OSS__] ) | |||
AC_MSG_RESULT(using OSS) | |||
AC_SUBST( audio_apis, [-D__LINUX_OSS__] ) | |||
fi | |||
;; | |||
*-sgi*) | |||
AC_SUBST( sound_api, [-D__IRIX_AL__] ) | |||
AC_SUBST( audio_apis, ["-D__IRIX_AL__ -LANG:std -w"] ) | |||
AC_MSG_RESULT(using IRIX AL) | |||
AC_CHECK_LIB(audio, alOpenPort, , AC_MSG_ERROR(IRIX audio support requires the audio library!) ) | |||
;; | |||
@@ -50,7 +77,7 @@ case $host in | |||
*-apple*) | |||
# Check for CoreAudio framework | |||
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, | |||
[AC_SUBST( sound_api, [-D__MACOSX_CORE__] )], | |||
[AC_SUBST( audio_apis, [-D__MACOSX_CORE__] )], | |||
[AC_MSG_ERROR(CoreAudio header files not found!)] ) | |||
AC_SUBST( frameworks, ["-framework CoreAudio"] ) | |||
AC_CHECK_LIB(stdc++, printf, , AC_MSG_ERROR(RtAudio requires the C++ library!) ) | |||
@@ -51,7 +51,7 @@ WARN_LOGFILE = | |||
#--------------------------------------------------------------------------- | |||
# configuration options related to the input files | |||
#--------------------------------------------------------------------------- | |||
INPUT = tutorial.txt ../../RtAudio.h | |||
INPUT = tutorial.txt ../../RtAudio.h ../../RtError.h | |||
FILE_PATTERNS = | |||
RECURSIVE = NO | |||
EXCLUDE = | |||
@@ -1,9 +1,9 @@ | |||
<HR> | |||
<table><tr><td><img src="../images/ccrma.gif"> | |||
<td>©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.<br> | |||
Maintained by Gary P. Scavone, <a href="mailto:gary@ccrma.stanford.edu">gary@ccrma.stanford.edu</a><P> | |||
<table><tr><td><img src="../images/mcgill.gif" width=165></td> | |||
<td>©2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.<br> | |||
Maintained by Gary P. Scavone, <a href="mailto:gary@music.mcgill.ca">gary@music.mcgill.ca</a></td></tr> | |||
</table> | |||
</BODY> | |||
</HTML> | |||
</HTML> |
@@ -6,4 +6,4 @@ | |||
<BODY BGCOLOR="#FFFFFF"> | |||
<CENTER> | |||
<a class="qindex" href="index.html">Tutorial</a> <a class="qindex" href="annotated.html">Class/Enum List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </CENTER> | |||
<HR> | |||
<HR> |
@@ -2,51 +2,49 @@ | |||
<BODY BGCOLOR="white"> | |||
- \ref intro | |||
- \ref download | |||
- \ref start | |||
- \ref error | |||
- \ref probing | |||
- \ref settings | |||
- \ref playbackb | |||
- \ref playbackc | |||
- \ref recording | |||
- \ref duplex | |||
- \ref methods | |||
- \ref compiling | |||
- \ref debug | |||
- \ref osnotes | |||
- \ref acknowledge | |||
- \ref license | |||
<CENTER>\ref intro \ref changes \ref download \ref start \ref error \ref probing \ref settings \ref playbackb \ref playbackc \ref recording \ref duplex \ref multi \ref methods \ref compiling \ref debug \ref apinotes \ref acknowledge \ref license</CENTER> | |||
\section intro Introduction | |||
RtAudio is a C++ class which provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA and OSS), Macintosh OS X, SGI, and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals: | |||
RtAudio is a set of C++ classes which provide a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, JACK, and OSS), Macintosh OS X, SGI, and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals: | |||
<UL> | |||
<LI>object oriented C++ design</LI> | |||
<LI>simple, common API across all supported platforms</LI> | |||
<LI>single independent header and source file for easy inclusion in programming projects</LI> | |||
<LI>only two header files and one source file for easy inclusion in programming projects</LI> | |||
<LI>allow simultaneous multi-api support</LI> | |||
<LI>blocking functionality</LI> | |||
<LI>callback functionality</LI> | |||
<LI>extensive audio device parameter control</LI> | |||
<LI>audio device capability probing</LI> | |||
<LI>automatic internal conversion for data format, channel number compensation, de-interleaving, and byte-swapping</LI> | |||
<LI>control over multiple audio streams and devices with a single instance</LI> | |||
</UL> | |||
RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. When allowed by the underlying audio API, multiple streams can run at the same time and a single device can serve multiple streams. See the \ref osnotes section for information specific to each of the supported audio APIs. | |||
RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. See the \ref apinotes section for information specific to each of the supported audio APIs. | |||
The RtAudio API provides both blocking (synchronous) and callback (asyncronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events. | |||
The RtAudio API provides both blocking (synchronous) and callback (asynchronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events. | |||
\section download Download | |||
\section changes What's New (Version 3.0) | |||
RtAudio now allows simultaneous multi-api support. For example, you can compile RtAudio to provide both DirectSound and ASIO support on Windows platforms or ALSA, JACK, and OSS support on Linux platforms. This was accomplished by creating an abstract base class, RtApi, with subclasses for each supported API (RtApiAlsa, RtApiJack, RtApiOss, RtApiDs, RtApiAsio, RtApiCore, and RtApiAl). The class RtAudio is now a "controller" which creates an instance of an RtApi subclass based on the user's API choice via an optional RtAudio::RtAudioApi instantiation argument. If no API is specified, RtAudio attempts to make a "logical" API selection. | |||
Support for the JACK low-latency audio server has been added with this version of RtAudio. It is necessary to have the JACK server running before creating an instance of RtAudio. | |||
Several API changes have been made in version 3.0 of RtAudio in an effort to provide more consistent behavior across all supported audio APIs. The most significant of these changes is that multiple stream support from a single RtAudio instance has been discontinued. As a result, stream identifier input arguments are no longer required. Also, the RtAudio::streamWillBlock() function was poorly supported by most APIs and has been deprecated (though the function still exists in those subclasses of RtApi that do allow it to be implemented). | |||
The 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). | |||
Latest Release (24 October 2002): <A href="http://www-ccrma.stanford.edu/~gary/rtaudio/release/rtaudio-2.1.1.tar.gz">Version 2.1.1 (165 kB tar/gzipped)</A> | |||
\section download Download | |||
Latest Release (11 March 2004): <A href="http://music.mcgill.ca/~gary/rtaudio/release/rtaudio-3.0.tar.gz">Version 3.0 (200 kB tar/gzipped)</A> | |||
\section start Getting Started | |||
The first thing that must be done when using RtAudio is to create an instance of the class. The default constructor RtAudio::RtAudio() 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: | |||
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: | |||
\code | |||
@@ -62,6 +60,7 @@ int main() | |||
} | |||
catch (RtError &error) { | |||
// Handle the exception here | |||
error.printMessage(); | |||
} | |||
// Clean up | |||
@@ -74,7 +73,7 @@ Obviously, this example doesn't demonstrate any of the real functionality of RtA | |||
\section error Error Handling | |||
RtAudio uses a C++ exception handler called RtError, which is declared and defined within the RtAudio class files. The RtError class is quite simple but it does allow errors to be "caught" by RtError::TYPE. Almost all RtAudio methods can "throw" an RtError, most typically if an invalid stream identifier is supplied to a method or a driver error occurs. There are a number of cases within RtAudio where warning messages may be displayed but an exception is not thrown. There is a private RtAudio method, error(), which can be modified to globally control how these messages are handled and reported. | |||
RtAudio uses a C++ exception handler called RtError, which is declared and defined in RtError.h. The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. Almost all RtAudio methods can "throw" an RtError, most typically if a driver error occurs or a stream function is called when no stream is open. There are a number of cases within RtAudio where warning messages may be displayed but an exception is not thrown. There is a protected RtAudio method, error(), which can be modified to globally control how these messages are handled and reported. By default, error messages are not automatically displayed in RtAudio unless the preprocessor definition __RTAUDIO_DEBUG__ is defined. Messages associated with caught exceptions can be displayed with, for example, the RtError::printMessage() function. | |||
\section probing Probing Device Capabilities | |||
@@ -105,11 +104,11 @@ int main() | |||
int devices = audio->getDeviceCount(); | |||
// Scan through devices for various capabilities | |||
RtAudio::RTAUDIO_DEVICE info; | |||
RtAudioDeviceInfo info; | |||
for (int i=1; i<=devices; i++) { | |||
try { | |||
audio->getDeviceInfo(i, &info); | |||
info = audio->getDeviceInfo(i); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -117,8 +116,8 @@ int main() | |||
} | |||
// Print, for example, the maximum number of output channels for each device | |||
cout << "device = " << i; | |||
cout << ": maximum output channels = " << info.maxOutputChannels << "\n"; | |||
std::cout << "device = " << i; | |||
std::cout << ": maximum output channels = " << info.outputChannels << "\n"; | |||
} | |||
// Clean up | |||
@@ -128,43 +127,38 @@ int main() | |||
} | |||
\endcode | |||
The RTAUDIO_DEVICE structure is defined in RtAudio.h and provides a variety of information useful in assessing the capabilities of a device: | |||
The RtAudioDeviceInfo structure is defined in RtAudio.h and provides a variety of information useful in assessing the capabilities of a device: | |||
\code | |||
typedef struct { | |||
char name[128]; | |||
bool probed; // true if the device probe was successful. | |||
int maxOutputChannels; | |||
int maxInputChannels; | |||
int maxDuplexChannels; | |||
int minOutputChannels; | |||
int minInputChannels; | |||
int minDuplexChannels; | |||
bool hasDuplexSupport; // true if duplex mode is supported. | |||
bool isDefault; // true if this is the default output or input device. | |||
int nSampleRates; // Number of discrete rates, or -1 if range supported. | |||
double sampleRates[MAX_SAMPLE_RATES]; // Supported sample rates, or {min, max} if range. | |||
RTAUDIO_FORMAT nativeFormats; | |||
} RTAUDIO_DEVICE; | |||
typedef struct RtAudioDeviceInfo{ | |||
std::string name; // Character string device identifier. | |||
bool probed; // true if the device capabilities were successfully probed. | |||
int outputChannels; // Maximum output channels supported by device. | |||
int inputChannels; // Maximum input channels supported by device. | |||
int duplexChannels; // Maximum simultaneous input/output channels supported by device. | |||
bool isDefault; // true if this is the default output or input device. | |||
std::vector<int> sampleRates; // Supported sample rates. | |||
RtAudioFormat nativeFormats; // Bit mask of supported data formats. | |||
}; | |||
\endcode | |||
The following data formats are defined and fully supported by RtAudio: | |||
\code | |||
typedef unsigned long RTAUDIO_FORMAT; | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT8; // Signed 8-bit integer | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT16; // Signed 16-bit integer | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT24; // Signed 24-bit integer (upper 3 bytes of 32-bit signed integer.) | |||
static const RTAUDIO_FORMAT RTAUDIO_SINT32; // Signed 32-bit integer | |||
static const RTAUDIO_FORMAT RTAUDIO_FLOAT32; // 32-bit float normalized between +/- 1.0 | |||
static const RTAUDIO_FORMAT RTAUDIO_FLOAT64; // 64-bit double normalized between +/- 1.0 | |||
typedef unsigned long RtAudioFormat; | |||
static const RtAudioFormat RTAUDIO_SINT8; // Signed 8-bit integer | |||
static const RtAudioFormat RTAUDIO_SINT16; // Signed 16-bit integer | |||
static const RtAudioFormat RTAUDIO_SINT24; // Signed 24-bit integer (upper 3 bytes of 32-bit signed integer.) | |||
static const RtAudioFormat RTAUDIO_SINT32; // Signed 32-bit integer | |||
static const RtAudioFormat RTAUDIO_FLOAT32; // 32-bit float normalized between +/- 1.0 | |||
static const RtAudioFormat RTAUDIO_FLOAT64; // 64-bit double normalized between +/- 1.0 | |||
\endcode | |||
The <I>nativeFormats</I> member of the RtAudio::RTAUDIO_DEVICE structure is a bit mask of the above formats which are natively supported by the device. However, RtAudio will automatically provide format conversion if a particular format is not natively supported. When the <I>probed</I> member of the RTAUDIO_DEVICE structure is false, the remaining structure members are undefined and the device is probably unuseable. | |||
The <I>nativeFormats</I> member of the RtAudioDeviceInfo structure is a bit mask of the above formats which are natively supported by the device. However, RtAudio will automatically provide format conversion if a particular format is not natively supported. When the <I>probed</I> member of the RtAudioDeviceInfo structure is false, the remaining structure members are undefined and the device is probably unuseable. | |||
In general, the user need not be concerned with the minimum channel values reported in the RTAUDIO_DEVICE structure. While some audio devices may require a minimum channel value > 1, RtAudio will provide automatic channel number compensation when the number of channels set by the user is less than that required by the device. Channel compensation is <I>NOT</I> possible when the number of channels set by the user is greater than that supported by the device. | |||
While some audio devices may require a minimum channel value greater than one, RtAudio will provide automatic channel number compensation when the number of channels set by the user is less than that required by the device. Channel compensation is <I>NOT</I> possible when the number of channels set by the user is greater than that supported by the device. | |||
It should be noted that the capabilities reported by a device driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. For this reason, RtAudio does not rely on the reported values when attempting to open a stream. | |||
It should be noted that the capabilities reported by a device driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. For this reason, RtAudio does not typically rely on the queried values when attempting to open a stream. | |||
\section settings Device Settings | |||
@@ -178,24 +172,30 @@ The next step in using RtAudio is to open a stream with particular device and pa | |||
int main() | |||
{ | |||
int channels = 2; | |||
int sample_rate = 44100; | |||
int buffer_size = 256; // 256 sample frames | |||
int n_buffers = 4; // number of internal buffers used by device | |||
int device = 0; // 0 indicates the default or first available device | |||
int stream; // our stream identifier | |||
int sampleRate = 44100; | |||
int bufferSize = 256; // 256 sample frames | |||
int nBuffers = 4; // number of internal buffers used by device | |||
int device = 0; // 0 indicates the default or first available device | |||
RtAudio *audio; | |||
// Instantiate RtAudio and open a stream within a try/catch block | |||
try { | |||
audio = new RtAudio(); | |||
stream = audio->openStream(device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT32, | |||
sample_rate, &buffer_size, n_buffers); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
try { | |||
audio->openStream(device, channels, 0, 0, RTAUDIO_FLOAT32, | |||
sampleRate, &bufferSize, nBuffers); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
// Perhaps try other parameters? | |||
} | |||
// Clean up | |||
delete audio; | |||
@@ -203,11 +203,11 @@ int main() | |||
} | |||
\endcode | |||
The RtAudio::openStream() method attempts to open a stream with a specified set of parameter values. When successful, a stream identifier is returned. In this case, we attempt to open a two channel playback stream with the default output device, 32-bit floating point data, a sample rate of 44100 Hz, a frame rate of 256 sample frames per read/write, and 4 internal device buffers. When device = 0, RtAudio first attempts to open the default audio device with the given parameters. If that attempt fails, RtAudio searches through the remaining available devices in an effort to find a device which will meet the given parameters. If all attempts are unsuccessful, an RtError is thrown. When a non-zero device value is specified, an attempt is made to open that device only (device = 1 specifies the first identified device, as reported by RtAudio::getDeviceInfo()). | |||
The RtAudio::openStream() method attempts to open a stream with a specified set of parameter values. In this case, we attempt to open a two channel playback stream with the default output device, 32-bit floating point data, a sample rate of 44100 Hz, a frame rate of 256 sample frames per read/write, and 4 internal device buffers. When device = 0, RtAudio first attempts to open the default audio device with the given parameters. If that attempt fails, RtAudio searches through the remaining available devices in an effort to find a device which will meet the given parameters. If all attempts are unsuccessful, an RtError is thrown. When a non-zero device value is specified, an attempt is made to open that device \e ONLY (device = 1 specifies the first identified device, as reported by RtAudio::getDeviceInfo()). | |||
RtAudio provides four signed integer and two floating point data formats which can be specified using the RtAudio::RTAUDIO_FORMAT parameter values mentioned earlier. If the opened device does not natively support the given format, RtAudio will automatically perform the necessary data format conversion. | |||
RtAudio provides four signed integer and two floating point data formats which can be specified using the RtAudioFormat parameter values mentioned earlier. If the opened device does not natively support the given format, RtAudio will automatically perform the necessary data format conversion. | |||
The <I>bufferSize</I> parameter specifies the desired number of sample frames which will be written to and/or read from a device per write/read operation. The <I>nBuffers</I> parameter is used in setting the underlying device buffer parameters. Both the <I>bufferSize</I> and <I>nBuffers</I> parameters can be used to control stream latency though there is no guarantee that the passed values will be those used by a device (the <I>nBuffers</I> parameter is ignored when using the OS X CoreAudio and the Windows ASIO APIs). In general, lower values for both parameters will produce less latency but perhaps less robust performance. Both parameters can be specified with values of zero, in which case the smallest allowable values will be used. The <I>bufferSize</I> parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. <I>bufferSize</I> values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Check the \ref osnotes section for general guidelines. | |||
The <I>bufferSize</I> parameter specifies the desired number of sample frames which will be written to and/or read from a device per write/read operation. The <I>nBuffers</I> parameter is used in setting the underlying device buffer parameters. Both the <I>bufferSize</I> and <I>nBuffers</I> parameters can be used to control stream latency though there is no guarantee that the passed values will be those used by a device (the <I>nBuffers</I> parameter is ignored when using the OS X CoreAudio, Linux Jack, and the Windows ASIO APIs). In general, lower values for both parameters will produce less latency but perhaps less robust performance. Both parameters can be specified with values of zero, in which case the smallest allowable values will be used. The <I>bufferSize</I> parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. <I>bufferSize</I> values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Check the \ref apinotes section for general guidelines. | |||
As noted earlier, the device capabilities reported by a driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. Because of this, RtAudio does not attempt to query a device's capabilities or use previously reported values when opening a device. Instead, RtAudio simply attempts to set the given parameters on a specified device and then checks whether the setup is successful or not. | |||
@@ -225,18 +225,17 @@ int main() | |||
{ | |||
int count; | |||
int channels = 2; | |||
int sample_rate = 44100; | |||
int buffer_size = 256; // 256 sample frames | |||
int n_buffers = 4; // number of internal buffers used by device | |||
int sampleRate = 44100; | |||
int bufferSize = 256; // 256 sample frames | |||
int nBuffers = 4; // number of internal buffers used by device | |||
float *buffer; | |||
int device = 0; // 0 indicates the default or first available device | |||
int stream; // our stream identifier | |||
int device = 0; // 0 indicates the default or first available device | |||
RtAudio *audio; | |||
// Open a stream during RtAudio instantiation | |||
try { | |||
audio = new RtAudio(&stream, device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT32, | |||
sample_rate, &buffer_size, n_buffers); | |||
audio = new RtAudio(device, channels, 0, 0, RTAUDIO_FLOAT32, | |||
sampleRate, &bufferSize, nBuffers); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -245,38 +244,38 @@ int main() | |||
try { | |||
// Get a pointer to the stream buffer | |||
buffer = (float *) audio->getStreamBuffer(stream); | |||
buffer = (float *) audio->getStreamBuffer(); | |||
// Start the stream | |||
audio->startStream(stream); | |||
audio->startStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
// An example loop which runs for about 40000 sample frames | |||
// An example loop which runs for 40000 sample frames | |||
count = 0; | |||
while (count < 40000) { | |||
// Generate your samples and fill the buffer with buffer_size sample frames of data | |||
// Generate your samples and fill the buffer with bufferSize sample frames of data | |||
... | |||
// Trigger the output of the data buffer | |||
try { | |||
audio->tickStream(stream); | |||
audio->tickStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
count += buffer_size; | |||
count += bufferSize; | |||
} | |||
try { | |||
// Stop and close the stream | |||
audio->stopStream(stream); | |||
audio->closeStream(stream); | |||
audio->stopStream(); | |||
audio->closeStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -289,9 +288,9 @@ int main() | |||
} | |||
\endcode | |||
The first thing to notice in this example is that we attempt to open a stream during class instantiation with an overloaded constructor. This constructor simply combines the functionality of the default constructor, used earlier, and the RtAudio::openStream() method. Again, we have specified a device value of 0, indicating that the default or first available device meeting the given parameters should be used. The integer identifier of the opened stream is returned via the <I>stream</I> pointer value. An attempt is made to open the stream with the specified <I>bufferSize</I> value. However, it is possible that the device will not accept this value, in which case the closest allowable size is used and returned via the pointer value. The constructor can fail if no available devices are found, or a memory allocation or device driver error occurs. Note that you should not call the RtAudio destructor if an exception is thrown during instantiation. | |||
The first thing to notice in this example is that we attempt to open a stream during class instantiation with an overloaded constructor. This constructor simply combines the functionality of the default constructor, used earlier, and the RtAudio::openStream() method. Again, we have specified a device value of 0, indicating that the default or first available device meeting the given parameters should be used. An attempt is made to open the stream with the specified <I>bufferSize</I> value. However, it is possible that the device will not accept this value, in which case the closest allowable size is used and returned via the pointer value. The constructor can fail if no available devices are found, or a memory allocation or device driver error occurs. Note that you should not call the RtAudio destructor if an exception is thrown during instantiation. | |||
Because RtAudio can typically be used to simultaneously control more than a single stream, it is necessary that the stream identifier be provided to nearly all public methods. Assuming the constructor is successful, it is necessary to get a pointer to the buffer, provided by RtAudio, for use in feeding data to/from the opened stream. Note that the user should <I>NOT</I> attempt to deallocate the stream buffer memory ... memory management for the stream buffer will be automatically controlled by RtAudio. After starting the stream with RtAudio::startStream(), one simply fills that buffer, which is of length equal to the returned <I>bufferSize</I> value, with interleaved audio data (in the specified format) for playback. Finally, a call to the RtAudio::tickStream() routine triggers a blocking write call for the stream. | |||
Assuming the constructor is successful, it is necessary to get a pointer to the buffer, provided by RtAudio, for use in feeding data to/from the opened stream. Note that the user should <I>NOT</I> attempt to deallocate the stream buffer memory ... memory management for the stream buffer will be automatically controlled by RtAudio. After starting the stream with RtAudio::startStream(), one simply fills that buffer, which is of length equal to the returned <I>bufferSize</I> value, with interleaved audio data (in the specified format) for playback. Finally, a call to the RtAudio::tickStream() routine triggers a blocking write call for the stream. | |||
In general, one should call the RtAudio::stopStream() and RtAudio::closeStream() methods after finishing with a stream. However, both methods will implicitly be called during object destruction if necessary. | |||
@@ -306,14 +305,14 @@ The primary difference in using RtAudio with callback functionality involves the | |||
#include "RtAudio.h" | |||
// Two-channel sawtooth wave generator. | |||
int sawtooth(char *buffer, int buffer_size, void *data) | |||
int sawtooth(char *buffer, int bufferSize, void *data) | |||
{ | |||
int i, j; | |||
double *my_buffer = (double *) buffer; | |||
double *my_data = (double *) data; | |||
// Write interleaved audio data. | |||
for (i=0; i<buffer_size; i++) { | |||
for (i=0; i<bufferSize; i++) { | |||
for (j=0; j<2; j++) { | |||
*my_buffer++ = my_data[j]; | |||
@@ -328,19 +327,18 @@ int sawtooth(char *buffer, int buffer_size, void *data) | |||
int main() | |||
{ | |||
int channels = 2; | |||
int sample_rate = 44100; | |||
int buffer_size = 256; // 256 sample frames | |||
int n_buffers = 4; // number of internal buffers used by device | |||
int device = 0; // 0 indicates the default or first available device | |||
int stream; // our stream identifier | |||
int sampleRate = 44100; | |||
int bufferSize = 256; // 256 sample frames | |||
int nBuffers = 4; // number of internal buffers used by device | |||
int device = 0; // 0 indicates the default or first available device | |||
double data[2]; | |||
char input; | |||
RtAudio *audio; | |||
// Open a stream during RtAudio instantiation | |||
try { | |||
audio = new RtAudio(&stream, device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT64, | |||
sample_rate, &buffer_size, n_buffers); | |||
audio = new RtAudio(device, channels, 0, 0, RTAUDIO_FLOAT64, | |||
sampleRate, &bufferSize, nBuffers); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -349,23 +347,23 @@ int main() | |||
try { | |||
// Set the stream callback function | |||
audio->setStreamCallback(stream, &sawtooth, (void *)data); | |||
audio->setStreamCallback(&sawtooth, (void *)data); | |||
// Start the stream | |||
audio->startStream(stream); | |||
audio->startStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nPlaying ... press <enter> to quit.\n"; | |||
cin.get(input); | |||
std::cout << "\nPlaying ... press <enter> to quit.\n"; | |||
std::cin.get(input); | |||
try { | |||
// Stop and close the stream | |||
audio->stopStream(stream); | |||
audio->closeStream(stream); | |||
audio->stopStream(); | |||
audio->closeStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -378,7 +376,7 @@ int main() | |||
} | |||
\endcode | |||
After opening the device in exactly the same way as the previous example (except with a data format change), we must set our callback function for the stream using RtAudio::setStreamCallback(). When the underlying audio API uses blocking calls (OSS, ALSA, SGI, and Windows DirectSound), this method will spawn a new process (or thread) which automatically calls the callback function when more data is needed. Callback-based audio APIs (OS X CoreAudio and ASIO) implement their own event notification schemes. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() methods). The last argument to RtAudio::setStreamCallback() is a pointer to arbitrary data that you wish to access from within your callback function. | |||
After opening the device in exactly the same way as the previous example (except with a data format change), we must set our callback function for the stream using RtAudio::setStreamCallback(). When the underlying audio API uses blocking calls (OSS, ALSA, SGI, and Windows DirectSound), this method will spawn a new process (or thread) which automatically calls the callback function when more data is needed. Callback-based audio APIs (OS X CoreAudio Linux Jack, and ASIO) implement their own event notification schemes. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() methods). The last argument to RtAudio::setStreamCallback() is a pointer to arbitrary data that you wish to access from within your callback function. | |||
In this example, we stop the stream with an explicit call to RtAudio::stopStream(). When using callback functionality, it is also possible to stop a stream by returning a non-zero value from the callback function. | |||
@@ -398,18 +396,17 @@ int main() | |||
{ | |||
int count; | |||
int channels = 2; | |||
int sample_rate = 44100; | |||
int buffer_size = 256; // 256 sample frames | |||
int n_buffers = 4; // number of internal buffers used by device | |||
int sampleRate = 44100; | |||
int bufferSize = 256; // 256 sample frames | |||
int nBuffers = 4; // number of internal buffers used by device | |||
float *buffer; | |||
int device = 0; // 0 indicates the default or first available device | |||
int stream; // our stream identifier | |||
int device = 0; // 0 indicates the default or first available device | |||
RtAudio *audio; | |||
// Instantiate RtAudio and open a stream. | |||
try { | |||
audio = new RtAudio(&stream, 0, 0, device, channels, | |||
RtAudio::RTAUDIO_FLOAT32, sample_rate, &buffer_size, n_buffers); | |||
RTAUDIO_FLOAT32, sampleRate, &bufferSize, nBuffers); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -418,10 +415,10 @@ int main() | |||
try { | |||
// Get a pointer to the stream buffer | |||
buffer = (float *) audio->getStreamBuffer(stream); | |||
buffer = (float *) audio->getStreamBuffer(); | |||
// Start the stream | |||
audio->startStream(stream); | |||
audio->startStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -434,22 +431,22 @@ int main() | |||
// Read a buffer of data | |||
try { | |||
audio->tickStream(stream); | |||
audio->tickStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
// Process the input samples (buffer_size sample frames) that were read | |||
// Process the input samples (bufferSize sample frames) that were read | |||
... | |||
count += buffer_size; | |||
count += bufferSize; | |||
} | |||
try { | |||
// Stop the stream | |||
audio->stopStream(stream); | |||
audio->stopStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -476,13 +473,13 @@ Finally, it is easy to use RtAudio for simultaneous audio input/output, or duple | |||
#include "RtAudio.h" | |||
// Pass-through function. | |||
int scale(char *buffer, int buffer_size, void *) | |||
int scale(char *buffer, int bufferSize, void *) | |||
{ | |||
// Note: do nothing here for pass through. | |||
double *my_buffer = (double *) buffer; | |||
// Scale input data for output. | |||
for (int i=0; i<buffer_size; i++) { | |||
for (int i=0; i<bufferSize; i++) { | |||
// Do for two channels. | |||
*my_buffer++ *= 0.5; | |||
*my_buffer++ *= 0.5; | |||
@@ -494,18 +491,17 @@ int scale(char *buffer, int buffer_size, void *) | |||
int main() | |||
{ | |||
int channels = 2; | |||
int sample_rate = 44100; | |||
int buffer_size = 256; // 256 sample frames | |||
int n_buffers = 4; // number of internal buffers used by device | |||
int device = 0; // 0 indicates the default or first available device | |||
int stream; // our stream identifier | |||
int sampleRate = 44100; | |||
int bufferSize = 256; // 256 sample frames | |||
int nBuffers = 4; // number of internal buffers used by device | |||
int device = 0; // 0 indicates the default or first available device | |||
char input; | |||
RtAudio *audio; | |||
// Open a stream during RtAudio instantiation | |||
try { | |||
audio = new RtAudio(&stream, device, channels, device, channels, RtAudio::RTAUDIO_FLOAT64, | |||
sample_rate, &buffer_size, n_buffers); | |||
audio = new RtAudio(device, channels, device, channels, RTAUDIO_FLOAT64, | |||
sampleRate, &bufferSize, nBuffers); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -514,23 +510,23 @@ int main() | |||
try { | |||
// Set the stream callback function | |||
audio->setStreamCallback(stream, &scale, NULL); | |||
audio->setStreamCallback(&scale, NULL); | |||
// Start the stream | |||
audio->startStream(stream); | |||
audio->startStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nRunning duplex ... press <enter> to quit.\n"; | |||
cin.get(input); | |||
std::cout << "\nRunning duplex ... press <enter> to quit.\n"; | |||
std::cin.get(input); | |||
try { | |||
// Stop and close the stream | |||
audio->stopStream(stream); | |||
audio->closeStream(stream); | |||
audio->stopStream(); | |||
audio->closeStream(); | |||
} | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
@@ -547,26 +543,30 @@ When an RtAudio stream is running in duplex mode (nonzero input <I>AND</I> outpu | |||
As we see with this example, the write-read sequence of operations does not preclude the use of RtAudio in situations where input data is first processed and then output through a duplex stream. When the stream buffer is first allocated, it is initialized with zeros, which produces no audible result when output to the device. In this example, anything recorded by the audio stream input will be scaled and played out during the next round of audio processing. | |||
Note that duplex operation can also be achieved by opening one output stream and one input stream using the same or different devices. However, there may be timing problems when attempting to use two different devices, due to possible device clock variations, unless a common external "sync" is provided. This becomes even more difficult to achieve using two separate callback streams because it is not possible to <I>explicitly</I> control the calling order of the callback functions. | |||
Note that duplex operation can also be achieved by opening one output stream instance and one input stream instance using the same or different devices. However, there may be timing problems when attempting to use two different devices, due to possible device clock variations, unless a common external "sync" is provided. This becomes even more difficult to achieve using two separate callback streams because it is not possible to <I>explicitly</I> control the calling order of the callback functions. | |||
\section multi Using Simultaneous Multiple APIs | |||
Because support for each audio API is encapsulated in a specific RtApi subclass, it is possible to compile and instantiate multiple API-specific subclasses on a given operating system. For example, one can compile both the RtApiDs and RtApiAsio classes on Windows operating systems by providing the appropriate preprocessor definitions, include files, and libraries for each. In a run-time situation, one might first attempt to determine whether any ASIO device drivers exist. This can be done by specifying the api argument RtAudio::WINDOWS_ASIO when attempting to create an instance of RtAudio. If an RtError is thrown (indicating no available drivers), then an instance of RtAudio with the api argument RtAudio::WINDOWS_DS can be created. Alternately, if no api argument is specified, RtAudio will first look for ASIO drivers and then DirectSound drivers (on Linux systems, the default API search order is Jack, Alsa, and finally OSS). In theory, it should also be possible to have separate instances of RtAudio open at the same time with different underlying audio API support, though this has not been tested. It is difficult to know how well different audio APIs can simultaneously coexist on a given operating system. In particular, it is most unlikely that the same device could be simultaneously controlled with two different audio APIs. | |||
\section methods Summary of Methods | |||
The following is short summary of public methods (not including constructors and the destructor) provided by RtAudio: | |||
The following is a short summary of public methods (not including constructors and the destructor) provided by RtAudio: | |||
<UL> | |||
<LI>RtAudio::openStream(): opens a stream with the specified parameters.</LI> | |||
<LI>RtAudio::setStreamCallback(): sets a user-defined callback function for a given stream.</LI> | |||
<LI>RtAudio::cancelStreamCallback(): cancels a callback process and function for a given stream.</LI> | |||
<LI>RtAudio::setStreamCallback(): sets a user-defined callback function for the stream.</LI> | |||
<LI>RtAudio::cancelStreamCallback(): cancels a callback process and function for the stream.</LI> | |||
<LI>RtAudio::getDeviceCount(): returns the number of audio devices available.</LI> | |||
<LI>RtAudio::getDeviceInfo(): fills a user-supplied RTAUDIO_DEVICE structure for a specified device.</LI> | |||
<LI>RtAudio::getDeviceInfo(): returns an RtAudioDeviceInfo structure for a specified device.</LI> | |||
<LI>RtAudio::getStreamBuffer(): returns a pointer to the stream buffer.</LI> | |||
<LI>RtAudio::tickStream(): triggers processing of input/output data for a stream (blocking).</LI> | |||
<LI>RtAudio::closeStream(): closes the specified stream (implicitly called during object destruction). Once a stream is closed, the stream identifier is invalid and should not be used in calling any other RtAudio methods.</LI> | |||
<LI>RtAudio::startStream(): (re)starts the specified stream, typically after it has been stopped with either stopStream() or abortStream() or after first opening the stream.</LI> | |||
<LI>RtAudio::stopStream(): stops the specified stream, allowing any remaining samples in the queue to be played out and/or read in. This does not implicitly call RtAudio::closeStream().</LI> | |||
<LI>RtAudio::abortStream(): stops the specified stream, discarding any remaining samples in the queue. This does not implicitly call closeStream().</LI> | |||
<LI>RtAudio::streamWillBlock(): queries a stream to determine whether a call to the <I>tickStream()</I> method will block. A return value of 0 indicates that the stream will NOT block. A positive return value indicates the number of sample frames that cannot yet be processed without blocking.</LI> | |||
<LI>RtAudio::tickStream(): triggers processing of input/output data for the stream (blocking).</LI> | |||
<LI>RtAudio::closeStream(): closes the stream (implicitly called during object destruction).</LI> | |||
<LI>RtAudio::startStream(): (re)starts the stream, typically after it has been stopped with either stopStream() or abortStream() or after first opening the stream.</LI> | |||
<LI>RtAudio::stopStream(): stops the stream, allowing any remaining samples in the queue to be played out and/or read in. This does not implicitly call RtAudio::closeStream().</LI> | |||
<LI>RtAudio::abortStream(): stops the stream, discarding any remaining samples in the queue. This does not implicitly call closeStream().</LI> | |||
</UL> | |||
@@ -579,6 +579,7 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to | |||
<TR BGCOLOR="beige"> | |||
<TD WIDTH="5%"><B>OS:</B></TD> | |||
<TD WIDTH="5%"><B>Audio API:</B></TD> | |||
<TD WIDTH="5%"><B>C++ Class:</B></TD> | |||
<TD WIDTH="5%"><B>Preprocessor Definition:</B></TD> | |||
<TD WIDTH="5%"><B>Library or Framework:</B></TD> | |||
<TD><B>Example Compiler Statement:</B></TD> | |||
@@ -586,13 +587,23 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to | |||
<TR> | |||
<TD>Linux</TD> | |||
<TD>ALSA</TD> | |||
<TD>RtApiAlsa</TD> | |||
<TD>__LINUX_ALSA__</TD> | |||
<TD><TT>asound, pthread</TT></TD> | |||
<TD><TT>g++ -Wall -D__LINUX_ALSA__ -o probe probe.cpp RtAudio.cpp -lasound -lpthread</TT></TD> | |||
</TR> | |||
<TR> | |||
<TD>Linux</TD> | |||
<TD>Jack Audio Server</TD> | |||
<TD>RtApiJack</TD> | |||
<TD>__LINUX_JACK__</TD> | |||
<TD><TT>jack, pthread</TT></TD> | |||
<TD><TT>g++ -Wall -D__LINUX_JACK__ -o probe probe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread</TT></TD> | |||
</TR> | |||
<TR> | |||
<TD>Linux</TD> | |||
<TD>OSS</TD> | |||
<TD>RtApiOss</TD> | |||
<TD>__LINUX_OSS__</TD> | |||
<TD><TT>pthread</TT></TD> | |||
<TD><TT>g++ -Wall -D__LINUX_OSS__ -o probe probe.cpp RtAudio.cpp -lpthread</TT></TD> | |||
@@ -600,13 +611,15 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to | |||
<TR> | |||
<TD>Macintosh OS X</TD> | |||
<TD>CoreAudio</TD> | |||
<TD>RtApiCore</TD> | |||
<TD>__MACOSX_CORE__</TD> | |||
<TD><TT>pthread, stdc++, CoreAudio</TT></TD> | |||
<TD><TT>CC -Wall -D__MACOSX_CORE__ -o probe probe.cpp RtAudio.cpp -framework CoreAudio -lstdc++ -lpthread</TT></TD> | |||
<TD><TT>g++ -Wall -D__MACOSX_CORE__ -o probe probe.cpp RtAudio.cpp -framework CoreAudio -lpthread</TT></TD> | |||
</TR> | |||
<TR> | |||
<TD>Irix</TD> | |||
<TD>AL</TD> | |||
<TD>RtApiAl</TD> | |||
<TD>__IRIX_AL__</TD> | |||
<TD><TT>audio, pthread</TT></TD> | |||
<TD><TT>CC -Wall -D__IRIX_AL__ -o probe probe.cpp RtAudio.cpp -laudio -lpthread</TT></TD> | |||
@@ -614,6 +627,7 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to | |||
<TR> | |||
<TD>Windows</TD> | |||
<TD>Direct Sound</TD> | |||
<TD>RtApiDs</TD> | |||
<TD>__WINDOWS_DS__</TD> | |||
<TD><TT>dsound.lib (ver. 5.0 or higher), multithreaded</TT></TD> | |||
<TD><I>compiler specific</I></TD> | |||
@@ -621,6 +635,7 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to | |||
<TR> | |||
<TD>Windows</TD> | |||
<TD>ASIO</TD> | |||
<TD>RtApiAsio</TD> | |||
<TD>__WINDOWS_ASIO__</TD> | |||
<TD><I>various ASIO header and source files</I></TD> | |||
<TD><I>compiler specific</I></TD> | |||
@@ -628,27 +643,31 @@ In order to compile RtAudio for a specific OS and audio API, it is necessary to | |||
</TABLE> | |||
<P> | |||
The example compiler statements above could be used to compile the <TT>probe.cpp</TT> example file, assuming that <TT>probe.cpp</TT>, <TT>RtAudio.h</TT>, and <TT>RtAudio.cpp</TT> all exist in the same directory. | |||
The example compiler statements above could be used to compile the <TT>probe.cpp</TT> example file, assuming that <TT>probe.cpp</TT>, <TT>RtAudio.h</TT>, <tt>RtError.h</tt>, and <TT>RtAudio.cpp</TT> all exist in the same directory. | |||
\section debug Debugging | |||
If you are having problems getting RtAudio to run on your system, try passing the preprocessor definition <TT>__RTAUDIO_DEBUG__</TT> to the compiler (or uncomment the definition at the bottom of RtAudio.h). A variety of warning messages will be displayed which may help in determining the problem. | |||
If you are having problems getting RtAudio to run on your system, try passing the preprocessor definition <TT>__RTAUDIO_DEBUG__</TT> to the compiler (or uncomment the definition at the bottom of RtAudio.h). A variety of warning messages will be displayed which may help in determining the problem. Also try using the programs included in the <tt>test</tt> directory. The program <tt>info</tt> displays the queried capabilities of all hardware devices found. | |||
\section osnotes OS Notes | |||
\section apinotes API Notes | |||
RtAudio is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues need to be mentioned with regard to each. | |||
RtAudio is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues should be mentioned with regard to each. | |||
\subsection linux Linux: | |||
RtAudio for Linux was developed under Redhat distributions 7.0 - 7.2. Two different audio APIs are supported on Linux platforms: OSS and <A href="http://www.alsa-project.org/">ALSA</A>. The OSS API has existed for at least 6 years and the Linux kernel is distributed with free versions of OSS audio drivers. Therefore, a generic Linux system is most likely to have OSS support. The ALSA API, although relatively new, is now part of the Linux development kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 0.9 and higher versions of ALSA. Input/output latency on the order of 15 milliseconds can typically be achieved under both OSS or ALSA by fine-tuning the RtAudio buffer parameters (without kernel modifications). Latencies on the order of 5 milliseconds or less can be achieved using a low-latency kernel patch and increasing FIFO scheduling priority. The pthread library, which is used for callback functionality, is a standard component of all Linux distributions. | |||
RtAudio for Linux was developed under Redhat distributions 7.0 - Fedora. Three different audio APIs are supported on Linux platforms: OSS, <A href="http://www.alsa-project.org/">ALSA</A>, and <A href="http://jackit.sourceforge.net/">Jack</A>. The OSS API has existed for at least 6 years and the Linux kernel is distributed with free versions of OSS audio drivers. Therefore, a generic Linux system is most likely to have OSS support (though the availability and quality of OSS drivers for new hardware is decreasing). The ALSA API, although relatively new, is now part of the Linux development kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 1.0 and higher versions of ALSA. Jack, which is still in development, is a low-latency audio server, written primarily for the GNU/Linux operating system. It can connect a number of different applications to an audio device, as well as allow them to share audio between themselves. Input/output latency on the order of 15 milliseconds can typically be achieved using any of the Linux APIs by fine-tuning the RtAudio buffer parameters (without kernel modifications). Latencies on the order of 5 milliseconds or less can be achieved using a low-latency kernel patch and increasing FIFO scheduling priority. The pthread library, which is used for callback functionality, is a standard component of all Linux distributions. | |||
The ALSA library includes OSS emulation support. That means that you can run programs compiled for the OSS API even when using the ALSA drivers and library. It should be noted however that OSS emulation under ALSA is not perfect. Specifically, channel number queries seem to consistently produce invalid results. While OSS emulation is successful for the majority of RtAudio tests, it is recommended that the native ALSA implementation of RtAudio be used on systems which have ALSA drivers installed. | |||
The ALSA implementation of RtAudio makes no use of the ALSA "plug" interface. All necessary data format conversions, channel compensation, de-interleaving, and byte-swapping is handled by internal RtAudio routines. | |||
The Jack API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. It should be noted, however, that the best performance is achieved when using RtAudio's callback functionality with the Jack API. At the moment, only one RtAudio instance can be connected to the Jack server. Because RtAudio does not provide a mechanism for allowing the user to specify particular channels (or ports) of a device, it simply opens the first <I>N</I> enumerated Jack ports for input/output. | |||
\subsection macosx Macintosh OS X (CoreAudio): | |||
The Apple CoreAudio API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. CoreAudio is designed to use a separate callback procedure for each of its audio devices. A single RtAudio duplex stream using two different devices is supported, though it cannot be guaranteed to always behave correctly because we cannot synchronize these two callbacks. This same functionality can be achieved with better synchrony by opening two separate streams for the devices and using RtAudio blocking calls (i.e. RtAudio::tickStream()). The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. It is not currently possible to have multiple simultaneous RtAudio streams accessing the same device. | |||
The Apple CoreAudio API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. CoreAudio is designed to use a separate callback procedure for each of its audio devices. A single RtAudio duplex stream using two different devices is supported, though it cannot be guaranteed to always behave correctly because we cannot synchronize these two callbacks. This same functionality might be achieved with better synchrony by creating separate instances of RtAudio for each device and making use of RtAudio blocking calls (i.e. RtAudio::tickStream()). The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. | |||
It is not possible to have multiple instances of RtAudio accessing the same CoreAudio device. | |||
\subsection irix Irix (SGI): | |||
@@ -656,25 +675,25 @@ The Irix version of RtAudio was written and tested on an SGI Indy running Irix v | |||
\subsection windowsds Windows (DirectSound): | |||
In order to compile RtAudio under Windows for the DirectSound API, you must have the header and source files for DirectSound version 5.0 or higher. As far as I know, there is no DirectSoundCapture support for Windows NT. Audio output latency with DirectSound can be reasonably good (on the order of 20 milliseconds). On the other hand, input audio latency tends to be terrible (100 milliseconds or more). Further, DirectSound drivers tend to crash easily when experimenting with buffer parameters. On my system, I found it necessary to use values around nBuffers = 8 and bufferSize = 512 to avoid crashes. RtAudio was developed with Visual C++ version 6.0. I was forced in several instances to modify code in order to get it to compile under the non-standard version of C++ that Microsoft so unprofessionally implemented. Unfortunately, it appears they are continuing to undermine the C++ standard with more recent compiler releases. | |||
In order to compile RtAudio under Windows for the DirectSound API, you must have the header and source files for DirectSound version 5.0 or higher. As far as I know, there is no DirectSoundCapture support for Windows NT. Audio output latency with DirectSound can be reasonably good (on the order of 20 milliseconds). On the other hand, input audio latency tends to be terrible (100 milliseconds or more). Further, DirectSound drivers tend to crash easily when experimenting with buffer parameters. On my system, I found it necessary to use values around nBuffers = 8 and bufferSize = 512 to avoid crashes. RtAudio was originally developed with Visual C++ version 6.0. | |||
\subsection windowsasio Windows (ASIO): | |||
The Steinberg ASIO audio API is based on a callback scheme. In addition, the API allows only a single device driver to be loaded and accessed at a time. Therefore, it is not possible to have multiple simultaneous RtAudio streams running concurrently with this API. ASIO device drivers must be supplied by audio hardware manufacturers, though ASIO emulation is possible on top of systems with DirectSound drivers. The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. | |||
The Steinberg ASIO audio API is based on a callback scheme. In addition, the API allows only a single device driver to be loaded and accessed at a time. ASIO device drivers must be supplied by audio hardware manufacturers, though ASIO emulation is possible on top of systems with DirectSound drivers. The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. | |||
A number of ASIO source and header files are required for use with RtAudio. Specifically, an RtAudio project must include the following files: <TT>asio.h,cpp; asiodrivers.h,cpp; asiolist.h,cpp; asiodrvr.h; asiosys.h; ginclude.h; iasiodrv.h</TT>. See the <TT>/tests/asio/</TT> directory for example Visual C++ 6.0 projects. | |||
A number of ASIO source and header files are required for use with RtAudio. Specifically, an RtAudio project must include the following files: <TT>asio.h,cpp; asiodrivers.h,cpp; asiolist.h,cpp; asiodrvr.h; asiosys.h; ginclude.h; iasiodrv.h</TT>. The Visual C++ projects found in <TT>/tests/Windows/</TT> compile both ASIO and DirectSound support. | |||
\section acknowledge Acknowledgements | |||
The RtAudio API incorporates many of the concepts developed in the <A href="http://www.portaudio.com/">PortAudio</A> project by Phil Burk and Ross Bencina. Early development also incorporated ideas from Bill Schottstaedt's <A href="http://www-ccrma.stanford.edu/software/snd/sndlib/">sndlib</A>. The CCRMA <A href="http://www-ccrma.stanford.edu/groups/soundwire/">SoundWire group</A> provided valuable feedback during the API proposal stages. | |||
RtAudio, version 2.0, was slowly developed over the course of many months while in residence at the <A href="http://www.iua.upf.es/">Institut Universitari de L'Audiovisual (IUA)</A> in Barcelona, Spain, the <A href="http://www.acoustics.hut.fi/">Laboratory of Acoustics and Audio Signal Processing</A> at the Helsinki University of Technology, Finland, and the <A href="http://www-ccrma.stanford.edu/">Center for Computer Research in Music and Acoustics (CCRMA)</A> at <A href="http://www.stanford.edu/">Stanford University</A>. This work was supported in part by the United States Air Force Office of Scientific Research (grant \#F49620-99-1-0293). | |||
The early 2.0 version of RtAudio was slowly developed over the course of many months while in residence at the <A href="http://www.iua.upf.es/">Institut Universitari de L'Audiovisual (IUA)</A> in Barcelona, Spain and the <A href="http://www.acoustics.hut.fi/">Laboratory of Acoustics and Audio Signal Processing</A> at the Helsinki University of Technology, Finland. Much subsequent development happened while working at the <A href="http://www-ccrma.stanford.edu/">Center for Computer Research in Music and Acoustics (CCRMA)</A> at <A href="http://www.stanford.edu/">Stanford University</A>. The most recent version of RtAudio was finished while working as an assistant professor of <a href="http://www.music.mcgill.ca/musictech/">Music Technology</a> at <a href="http://www.mcgill.ca/">McGill University</a>. This work was supported in part by the United States Air Force Office of Scientific Research (grant \#F49620-99-1-0293). | |||
\section license License | |||
RtAudio: a realtime audio i/o C++ class<BR> | |||
Copyright (c) 2001-2002 Gary P. Scavone | |||
RtAudio: a realtime audio i/o C++ classes<BR> | |||
Copyright (c) 2001-2004 Gary P. Scavone | |||
Permission is hereby granted, free of charge, to any person | |||
obtaining a copy of this software and associated documentation files | |||
@@ -1,6 +1,14 @@ | |||
RtAudio - a C++ class which provides a common API for realtime audio input/output across Linux (native ALSA and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. | |||
RtAudio - a set of C++ classes which provide a common API for realtime audio input/output across Linux (native ALSA, JACK, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. | |||
By Gary P. Scavone, 2002. | |||
By Gary P. Scavone, 2001-2004. | |||
v3.0: (11 March 2004) | |||
- added Linux Jack audio server support | |||
- new multi-api support by subclassing all apis and making rtaudio a controller class | |||
- added over/underload check to Mac OS X support | |||
- new scheme for blocking functionality in callback-based apis (CoreAudio, ASIO, and JACK) | |||
- removed multiple stream support (all stream indentifier arguments removed) | |||
- various style and name changes to conform with standard C++ practice | |||
v2.1.1: (24 October 2002) | |||
- bug fix in duplex for Mac OS X and Windows ASIO code | |||
@@ -1,10 +1,10 @@ | |||
RtAudio - a C++ class which provides a common API for realtime audio input/output across Linux (native ALSA and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. | |||
RtAudio - a set of C++ classes which provide a common API for realtime audio input/output across Linux (native ALSA, JACK, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. | |||
By Gary P. Scavone, 2002. | |||
By Gary P. Scavone, 2001-2004. | |||
To configure and compile (on Unix systems): | |||
1. Unpack the RtAudio distribution (tar -xzf rtaudio-2.x.tar.gz). | |||
1. Unpack the RtAudio distribution (tar -xzf rtaudio-x.x.tar.gz). | |||
2. From within the directory containing this file, run configure: | |||
./configure | |||
@@ -15,6 +15,8 @@ A few options can be passed to configure, including: | |||
--enable-debug = enable various debug output | |||
--with-alsa = choose native ALSA API support (linux only) | |||
--with-jack = choose JACK server support (linux only) | |||
--with-oss = choose OSS API support (linux only) | |||
Typing "./configure --help" will display all the available options. | |||
@@ -25,4 +27,4 @@ If you wish to use a different compiler than that selected by configure, specify | |||
For Windows Users: | |||
Visual C++ 6.0 project files are included for the test programs. For projects using the DirectSound API, go to the /tests/DirectSound/ directory. For projects using the ASIO API, go to the /tests/asio/ directory. | |||
Visual C++ 6.0 project files are included for the test programs in the /tests/Windows/ directory. These projects compile API support for both ASIO and DirectSound. |
@@ -1,43 +1,44 @@ | |||
RtAudio - a C++ class which provides a common API for realtime audio input/output across Linux (native ALSA and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. | |||
RtAudio - a set of C++ classes which provide a common API for realtime audio input/output across Linux (native ALSA, JACK, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. | |||
By Gary P. Scavone, 2002. | |||
By Gary P. Scavone, 2001-2004. | |||
This distribution of the Synthesis ToolKit in C++ (STK) contains the following: | |||
This distribution of RtAudio contains the following: | |||
doc: RtAudio documentation | |||
doc: RtAudio documentation (see doc/html/index.html) | |||
tests: example RtAudio programs | |||
asio: header files necessary for ASIO compilation | |||
tests/Windows: Visual C++ 6.0 test program workspace and projects | |||
OVERVIEW: | |||
RtAudio is a C++ class which provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals: | |||
RtAudio is a set of C++ classes which provide a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, JACK, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals: | |||
- object oriented C++ design | |||
- simple, common API across all supported platforms | |||
- single independent header and source file for easy inclusion in programming projects | |||
- only two header files and one source file for easy inclusion in programming projects | |||
- allow simultaneous multi-api support | |||
- blocking functionality | |||
- callback functionality | |||
- extensive audio device parameter control | |||
- audio device capability probing | |||
- automatic internal conversion for data format, channel number compensation, de-interleaving, and byte-swapping | |||
- control over multiple audio streams and devices with a single instance | |||
RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Multiple streams can run at the same time and, when allowed by the underlying audio API, a single device can serve multiple streams. | |||
RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. | |||
The RtAudio API provides both blocking (synchronous) and callback (asyncronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events. | |||
FURTHER READING: | |||
For complete documentation on RtAudio, see the doc directory of the distribution or surf to http://www-ccrma.stanford.edu/~gary/rtaudio/. | |||
For complete documentation on RtAudio, see the doc directory of the distribution or surf to http://music.mcgill.ca/~gary/rtaudio/. | |||
LEGAL AND ETHICAL: | |||
The RtAudio license is similar to the the MIT License, with the added "feature" that modifications be sent to the developer. | |||
RtAudio: a realtime audio i/o C++ class | |||
Copyright (c) 2001-2002 Gary P. Scavone | |||
RtAudio: a set of realtime audio i/o C++ classes | |||
Copyright (c) 2001-2004 Gary P. Scavone | |||
Permission is hereby granted, free of charge, to any person | |||
obtaining a copy of this software and associated documentation files |
@@ -1,110 +0,0 @@ | |||
# Microsoft Developer Studio Project File - Name="play_saw" - Package Owner=<4> | |||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 | |||
# ** DO NOT EDIT ** | |||
# TARGTYPE "Win32 (x86) Console Application" 0x0103 | |||
CFG=play_saw - Win32 Debug | |||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, | |||
!MESSAGE use the Export Makefile command and run | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "play_saw.mak". | |||
!MESSAGE | |||
!MESSAGE You can specify a configuration when running NMAKE | |||
!MESSAGE by defining the macro CFG on the command line. For example: | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "play_saw.mak" CFG="play_saw - Win32 Debug" | |||
!MESSAGE | |||
!MESSAGE Possible choices for configuration are: | |||
!MESSAGE | |||
!MESSAGE "play_saw - Win32 Release" (based on "Win32 (x86) Console Application") | |||
!MESSAGE "play_saw - Win32 Debug" (based on "Win32 (x86) Console Application") | |||
!MESSAGE | |||
# Begin Project | |||
# PROP AllowPerConfigDependencies 0 | |||
# PROP Scc_ProjName "" | |||
# PROP Scc_LocalPath "" | |||
CPP=cl.exe | |||
RSC=rc.exe | |||
!IF "$(CFG)" == "play_saw - Win32 Release" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 0 | |||
# PROP BASE Output_Dir "Release" | |||
# PROP BASE Intermediate_Dir "Release" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "play_saw - Win32 Debug" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 1 | |||
# PROP BASE Output_Dir "Debug" | |||
# PROP BASE Intermediate_Dir "Debug" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
# Begin Target | |||
# Name "play_saw - Win32 Release" | |||
# Name "play_saw - Win32 Debug" | |||
# Begin Group "Source Files" | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=..\play_saw.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group | |||
# Begin Group "Resource Files" | |||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | |||
# End Group | |||
# End Target | |||
# End Project |
@@ -1,137 +0,0 @@ | |||
Microsoft Developer Studio Workspace File, Format Version 6.00 | |||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! | |||
############################################################################### | |||
Project: "call_inout"=.\call_inout.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "call_playtwo"=.\call_playtwo.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "call_saw"=.\call_saw.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "call_twostreams"=.\call_twostreams.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "in_out"=.\in_out.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "info"=.\info.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "play_raw"=.\play_raw.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "play_saw"=.\play_saw.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "record_raw"=.\record_raw.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "twostreams"=.\twostreams.dsp - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Global: | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<3> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
@@ -1,6 +1,6 @@ | |||
### RtAudio tests Makefile - for various flavors of unix | |||
PROGRAMS = info play_saw record_raw in_out play_raw twostreams call_saw call_inout call_twostreams call_playtwo | |||
PROGRAMS = info play_saw record_raw in_out play_raw twostreams call_saw call_inout | |||
RM = /bin/rm | |||
SRC_PATH = ../ | |||
INCLUDE = ../ | |||
@@ -11,7 +11,7 @@ OBJECTS = RtAudio.o | |||
CC = @CXX@ | |||
DEFS = @debug@ | |||
DEFS += @sound_api@ | |||
DEFS += @audio_apis@ | |||
CFLAGS = @cflags@ | |||
CFLAGS += @warn@ -I$(INCLUDE) | |||
LIBRARY = @LIBS@ | |||
@@ -46,12 +46,6 @@ call_saw : call_saw.cpp $(OBJECTS) | |||
call_inout : call_inout.cpp $(OBJECTS) | |||
$(CC) $(CFLAGS) $(DEFS) -o call_inout call_inout.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY) | |||
call_twostreams : call_twostreams.cpp $(OBJECTS) | |||
$(CC) $(CFLAGS) $(DEFS) -o call_twostreams call_twostreams.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY) | |||
call_playtwo : call_playtwo.cpp $(OBJECTS) | |||
$(CC) $(CFLAGS) $(DEFS) -o call_playtwo call_playtwo.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY) | |||
clean : | |||
-rm $(OBJECT_PATH)/*.o | |||
-rm $(PROGRAMS) | |||
@@ -0,0 +1,955 @@ | |||
//--------------------------------------------------------------------------------------------------- | |||
//--------------------------------------------------------------------------------------------------- | |||
/* | |||
Steinberg Audio Stream I/O API | |||
(c) 1997 - 1999, Steinberg Soft- und Hardware GmbH | |||
ASIO Interface Specification v 2.0 | |||
basic concept is an i/o synchronous double-buffer scheme: | |||
on bufferSwitch(index == 0), host will read/write: | |||
after ASIOStart(), the | |||
read first input buffer A (index 0) | |||
| will be invalid (empty) | |||
* ------------------------ | |||
|------------------------|-----------------------| | |||
| | | | |||
| Input Buffer A (0) | Input Buffer B (1) | | |||
| | | | |||
|------------------------|-----------------------| | |||
| | | | |||
| Output Buffer A (0) | Output Buffer B (1) | | |||
| | | | |||
|------------------------|-----------------------| | |||
* ------------------------- | |||
| before calling ASIOStart(), | |||
write host will have filled output | |||
buffer B (index 1) already | |||
*please* take special care of proper statement of input | |||
and output latencies (see ASIOGetLatencies()), these | |||
control sequencer sync accuracy | |||
*/ | |||
//--------------------------------------------------------------------------------------------------- | |||
//--------------------------------------------------------------------------------------------------- | |||
/* | |||
prototypes summary: | |||
ASIOError ASIOInit(ASIODriverInfo *info); | |||
ASIOError ASIOExit(void); | |||
ASIOError ASIOStart(void); | |||
ASIOError ASIOStop(void); | |||
ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels); | |||
ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency); | |||
ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); | |||
ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate); | |||
ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate); | |||
ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate); | |||
ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources); | |||
ASIOError ASIOSetClockSource(long reference); | |||
ASIOError ASIOGetSamplePosition (ASIOSamples *sPos, ASIOTimeStamp *tStamp); | |||
ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info); | |||
ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels, | |||
long bufferSize, ASIOCallbacks *callbacks); | |||
ASIOError ASIODisposeBuffers(void); | |||
ASIOError ASIOControlPanel(void); | |||
void *ASIOFuture(long selector, void *params); | |||
ASIOError ASIOOutputReady(void); | |||
*/ | |||
//--------------------------------------------------------------------------------------------------- | |||
//--------------------------------------------------------------------------------------------------- | |||
#ifndef __ASIO_H | |||
#define __ASIO_H | |||
// force 4 byte alignment | |||
#if defined(_MSC_VER) && !defined(__MWERKS__) | |||
#pragma pack(push,4) | |||
#elif PRAGMA_ALIGN_SUPPORTED | |||
#pragma options align = native | |||
#endif | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// Type definitions | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// number of samples data type is 64 bit integer | |||
#if NATIVE_INT64 | |||
typedef long long int ASIOSamples; | |||
#else | |||
typedef struct ASIOSamples { | |||
unsigned long hi; | |||
unsigned long lo; | |||
} ASIOSamples; | |||
#endif | |||
// Timestamp data type is 64 bit integer, | |||
// Time format is Nanoseconds. | |||
#if NATIVE_INT64 | |||
typedef long long int ASIOTimeStamp ; | |||
#else | |||
typedef struct ASIOTimeStamp { | |||
unsigned long hi; | |||
unsigned long lo; | |||
} ASIOTimeStamp; | |||
#endif | |||
// Samplerates are expressed in IEEE 754 64 bit double float, | |||
// native format as host computer | |||
#if IEEE754_64FLOAT | |||
typedef double ASIOSampleRate; | |||
#else | |||
typedef struct ASIOSampleRate { | |||
char ieee[8]; | |||
} ASIOSampleRate; | |||
#endif | |||
// Boolean values are expressed as long | |||
typedef long ASIOBool; | |||
enum { | |||
ASIOFalse = 0, | |||
ASIOTrue = 1 | |||
}; | |||
// Sample Types are expressed as long | |||
typedef long ASIOSampleType; | |||
enum { | |||
ASIOSTInt16MSB = 0, | |||
ASIOSTInt24MSB = 1, // used for 20 bits as well | |||
ASIOSTInt32MSB = 2, | |||
ASIOSTFloat32MSB = 3, // IEEE 754 32 bit float | |||
ASIOSTFloat64MSB = 4, // IEEE 754 64 bit double float | |||
// these are used for 32 bit data buffer, with different alignment of the data inside | |||
// 32 bit PCI bus systems can be more easily used with these | |||
ASIOSTInt32MSB16 = 8, // 32 bit data with 18 bit alignment | |||
ASIOSTInt32MSB18 = 9, // 32 bit data with 18 bit alignment | |||
ASIOSTInt32MSB20 = 10, // 32 bit data with 20 bit alignment | |||
ASIOSTInt32MSB24 = 11, // 32 bit data with 24 bit alignment | |||
ASIOSTInt16LSB = 16, | |||
ASIOSTInt24LSB = 17, // used for 20 bits as well | |||
ASIOSTInt32LSB = 18, | |||
ASIOSTFloat32LSB = 19, // IEEE 754 32 bit float, as found on Intel x86 architecture | |||
ASIOSTFloat64LSB = 20, // IEEE 754 64 bit double float, as found on Intel x86 architecture | |||
// these are used for 32 bit data buffer, with different alignment of the data inside | |||
// 32 bit PCI bus systems can more easily used with these | |||
ASIOSTInt32LSB16 = 24, // 32 bit data with 18 bit alignment | |||
ASIOSTInt32LSB18 = 25, // 32 bit data with 18 bit alignment | |||
ASIOSTInt32LSB20 = 26, // 32 bit data with 20 bit alignment | |||
ASIOSTInt32LSB24 = 27 // 32 bit data with 24 bit alignment | |||
}; | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// Error codes | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
typedef long ASIOError; | |||
enum { | |||
ASE_OK = 0, // This value will be returned whenever the call succeeded | |||
ASE_SUCCESS = 0x3f4847a0, // unique success return value for ASIOFuture calls | |||
ASE_NotPresent = -1000, // hardware input or output is not present or available | |||
ASE_HWMalfunction, // hardware is malfunctioning (can be returned by any ASIO function) | |||
ASE_InvalidParameter, // input parameter invalid | |||
ASE_InvalidMode, // hardware is in a bad mode or used in a bad mode | |||
ASE_SPNotAdvancing, // hardware is not running when sample position is inquired | |||
ASE_NoClock, // sample clock or rate cannot be determined or is not present | |||
ASE_NoMemory // not enough memory for completing the request | |||
}; | |||
//--------------------------------------------------------------------------------------------------- | |||
//--------------------------------------------------------------------------------------------------- | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// Time Info support | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
typedef struct ASIOTimeCode | |||
{ | |||
double speed; // speed relation (fraction of nominal speed) | |||
// optional; set to 0. or 1. if not supported | |||
ASIOSamples timeCodeSamples; // time in samples | |||
unsigned long flags; // some information flags (see below) | |||
char future[64]; | |||
} ASIOTimeCode; | |||
typedef enum ASIOTimeCodeFlags | |||
{ | |||
kTcValid = 1, | |||
kTcRunning = 1 << 1, | |||
kTcReverse = 1 << 2, | |||
kTcOnspeed = 1 << 3, | |||
kTcStill = 1 << 4, | |||
kTcSpeedValid = 1 << 8 | |||
} ASIOTimeCodeFlags; | |||
typedef struct AsioTimeInfo | |||
{ | |||
double speed; // absolute speed (1. = nominal) | |||
ASIOTimeStamp systemTime; // system time related to samplePosition, in nanoseconds | |||
// on mac, must be derived from Microseconds() (not UpTime()!) | |||
// on windows, must be derived from timeGetTime() | |||
ASIOSamples samplePosition; | |||
ASIOSampleRate sampleRate; // current rate | |||
unsigned long flags; // (see below) | |||
char reserved[12]; | |||
} AsioTimeInfo; | |||
typedef enum AsioTimeInfoFlags | |||
{ | |||
kSystemTimeValid = 1, // must always be valid | |||
kSamplePositionValid = 1 << 1, // must always be valid | |||
kSampleRateValid = 1 << 2, | |||
kSpeedValid = 1 << 3, | |||
kSampleRateChanged = 1 << 4, | |||
kClockSourceChanged = 1 << 5 | |||
} AsioTimeInfoFlags; | |||
typedef struct ASIOTime // both input/output | |||
{ | |||
long reserved[4]; // must be 0 | |||
struct AsioTimeInfo timeInfo; // required | |||
struct ASIOTimeCode timeCode; // optional, evaluated if (timeCode.flags & kTcValid) | |||
} ASIOTime; | |||
/* | |||
using time info: | |||
it is recommended to use the new method with time info even if the asio | |||
device does not support timecode; continuous calls to ASIOGetSamplePosition | |||
and ASIOGetSampleRate are avoided, and there is a more defined relationship | |||
between callback time and the time info. | |||
see the example below. | |||
to initiate time info mode, after you have received the callbacks pointer in | |||
ASIOCreateBuffers, you will call the asioMessage callback with kAsioSupportsTimeInfo | |||
as the argument. if this returns 1, host has accepted time info mode. | |||
now host expects the new callback bufferSwitchTimeInfo to be used instead | |||
of the old bufferSwitch method. the ASIOTime structure is assumed to be valid | |||
and accessible until the callback returns. | |||
using time code: | |||
if the device supports reading time code, it will call host's asioMessage callback | |||
with kAsioSupportsTimeCode as the selector. it may then fill the according | |||
fields and set the kTcValid flag. | |||
host will call the future method with the kAsioEnableTimeCodeRead selector when | |||
it wants to enable or disable tc reading by the device. you should also support | |||
the kAsioCanTimeInfo and kAsioCanTimeCode selectors in ASIOFuture (see example). | |||
note: | |||
the AsioTimeInfo/ASIOTimeCode pair is supposed to work in both directions. | |||
as a matter of convention, the relationship between the sample | |||
position counter and the time code at buffer switch time is | |||
(ignoring offset between tc and sample pos when tc is running): | |||
on input: sample 0 -> input buffer sample 0 -> time code 0 | |||
on output: sample 0 -> output buffer sample 0 -> time code 0 | |||
this means that for 'real' calculations, one has to take into account | |||
the according latencies. | |||
example: | |||
ASIOTime asioTime; | |||
in createBuffers() | |||
{ | |||
memset(&asioTime, 0, sizeof(ASIOTime)); | |||
AsioTimeInfo* ti = &asioTime.timeInfo; | |||
ti->sampleRate = theSampleRate; | |||
ASIOTimeCode* tc = &asioTime.timeCode; | |||
tc->speed = 1.; | |||
timeInfoMode = false; | |||
canTimeCode = false; | |||
if(callbacks->asioMessage(kAsioSupportsTimeInfo, 0, 0, 0) == 1) | |||
{ | |||
timeInfoMode = true; | |||
#if kCanTimeCode | |||
if(callbacks->asioMessage(kAsioSupportsTimeCode, 0, 0, 0) == 1) | |||
canTimeCode = true; | |||
#endif | |||
} | |||
} | |||
void switchBuffers(long doubleBufferIndex, bool processNow) | |||
{ | |||
if(timeInfoMode) | |||
{ | |||
AsioTimeInfo* ti = &asioTime.timeInfo; | |||
ti->flags = kSystemTimeValid | kSamplePositionValid | kSampleRateValid; | |||
ti->systemTime = theNanoSeconds; | |||
ti->samplePosition = theSamplePosition; | |||
if(ti->sampleRate != theSampleRate) | |||
ti->flags |= kSampleRateChanged; | |||
ti->sampleRate = theSampleRate; | |||
#if kCanTimeCode | |||
if(canTimeCode && timeCodeEnabled) | |||
{ | |||
ASIOTimeCode* tc = &asioTime.timeCode; | |||
tc->timeCodeSamples = tcSamples; // tc in samples | |||
tc->flags = kTcValid | kTcRunning | kTcOnspeed; // if so... | |||
} | |||
ASIOTime* bb = callbacks->bufferSwitchTimeInfo(&asioTime, doubleBufferIndex, processNow ? ASIOTrue : ASIOFalse); | |||
#else | |||
callbacks->bufferSwitchTimeInfo(&asioTime, doubleBufferIndex, processNow ? ASIOTrue : ASIOFalse); | |||
#endif | |||
} | |||
else | |||
callbacks->bufferSwitch(doubleBufferIndex, ASIOFalse); | |||
} | |||
ASIOError ASIOFuture(long selector, void *params) | |||
{ | |||
switch(selector) | |||
{ | |||
case kAsioEnableTimeCodeRead: | |||
timeCodeEnabled = true; | |||
return ASE_SUCCESS; | |||
case kAsioDisableTimeCodeRead: | |||
timeCodeEnabled = false; | |||
return ASE_SUCCESS; | |||
case kAsioCanTimeInfo: | |||
return ASE_SUCCESS; | |||
#if kCanTimeCode | |||
case kAsioCanTimeCode: | |||
return ASE_SUCCESS; | |||
#endif | |||
} | |||
return ASE_NotPresent; | |||
}; | |||
*/ | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// application's audio stream handler callbacks | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
typedef struct ASIOCallbacks | |||
{ | |||
void (*bufferSwitch) (long doubleBufferIndex, ASIOBool directProcess); | |||
// bufferSwitch indicates that both input and output are to be processed. | |||
// the current buffer half index (0 for A, 1 for B) determines | |||
// - the output buffer that the host should start to fill. the other buffer | |||
// will be passed to output hardware regardless of whether it got filled | |||
// in time or not. | |||
// - the input buffer that is now filled with incoming data. Note that | |||
// because of the synchronicity of i/o, the input always has at | |||
// least one buffer latency in relation to the output. | |||
// directProcess suggests to the host whether it should immedeately | |||
// start processing (directProcess == ASIOTrue), or whether its process | |||
// should be deferred because the call comes from a very low level | |||
// (for instance, a high level priority interrupt), and direct processing | |||
// would cause timing instabilities for the rest of the system. If in doubt, | |||
// directProcess should be set to ASIOFalse. | |||
// Note: bufferSwitch may be called at interrupt time for highest efficiency. | |||
void (*sampleRateDidChange) (ASIOSampleRate sRate); | |||
// gets called when the AudioStreamIO detects a sample rate change | |||
// If sample rate is unknown, 0 is passed (for instance, clock loss | |||
// when externally synchronized). | |||
long (*asioMessage) (long selector, long value, void* message, double* opt); | |||
// generic callback for various purposes, see selectors below. | |||
// note this is only present if the asio version is 2 or higher | |||
ASIOTime* (*bufferSwitchTimeInfo) (ASIOTime* params, long doubleBufferIndex, ASIOBool directProcess); | |||
// new callback with time info. makes ASIOGetSamplePosition() and various | |||
// calls to ASIOGetSampleRate obsolete, | |||
// and allows for timecode sync etc. to be preferred; will be used if | |||
// the driver calls asioMessage with selector kAsioSupportsTimeInfo. | |||
} ASIOCallbacks; | |||
// asioMessage selectors | |||
enum | |||
{ | |||
kAsioSelectorSupported = 1, // selector in <value>, returns 1L if supported, | |||
// 0 otherwise | |||
kAsioEngineVersion, // returns engine (host) asio implementation version, | |||
// 2 or higher | |||
kAsioResetRequest, // request driver reset. if accepted, this | |||
// will close the driver (ASIO_Exit() ) and | |||
// re-open it again (ASIO_Init() etc). some | |||
// drivers need to reconfigure for instance | |||
// when the sample rate changes, or some basic | |||
// changes have been made in ASIO_ControlPanel(). | |||
// returns 1L; note the request is merely passed | |||
// to the application, there is no way to determine | |||
// if it gets accepted at this time (but it usually | |||
// will be). | |||
kAsioBufferSizeChange, // not yet supported, will currently always return 0L. | |||
// for now, use kAsioResetRequest instead. | |||
// once implemented, the new buffer size is expected | |||
// in <value>, and on success returns 1L | |||
kAsioResyncRequest, // the driver went out of sync, such that | |||
// the timestamp is no longer valid. this | |||
// is a request to re-start the engine and | |||
// slave devices (sequencer). returns 1 for ok, | |||
// 0 if not supported. | |||
kAsioLatenciesChanged, // the drivers latencies have changed. The engine | |||
// will refetch the latencies. | |||
kAsioSupportsTimeInfo, // if host returns true here, it will expect the | |||
// callback bufferSwitchTimeInfo to be called instead | |||
// of bufferSwitch | |||
kAsioSupportsTimeCode, // supports time code reading/writing | |||
kAsioSupportsInputMonitor, // supports input monitoring | |||
kAsioNumMessageSelectors | |||
}; | |||
//--------------------------------------------------------------------------------------------------- | |||
//--------------------------------------------------------------------------------------------------- | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// (De-)Construction | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
typedef struct ASIODriverInfo | |||
{ | |||
long asioVersion; // currently, 2 | |||
long driverVersion; // driver specific | |||
char name[32]; | |||
char errorMessage[124]; | |||
void *sysRef; // on input: system reference | |||
// (Windows: application main window handle, Mac & SGI: 0) | |||
} ASIODriverInfo; | |||
ASIOError ASIOInit(ASIODriverInfo *info); | |||
/* Purpose: | |||
Initialize the AudioStreamIO. | |||
Parameter: | |||
info: pointer to an ASIODriver structure: | |||
- asioVersion: | |||
- on input, the host version. *** Note *** this is 0 for earlier asio | |||
implementations, and the asioMessage callback is implemeted | |||
only if asioVersion is 2 or greater. sorry but due to a design fault | |||
the driver doesn't have access to the host version in ASIOInit :-( | |||
added selector for host (engine) version in the asioMessage callback | |||
so we're ok from now on. | |||
- on return, asio implementation version. | |||
older versions are 1 | |||
if you support this version (namely, ASIO_outputReady() ) | |||
this should be 2 or higher. also see the note in | |||
ASIO_getTimeStamp() ! | |||
- version: on return, the driver version (format is driver specific) | |||
- name: on return, a null-terminated string containing the driver's name | |||
- error message: on return, should contain a user message describing | |||
the type of error that occured during ASIOInit(), if any. | |||
- sysRef: platform specific | |||
Returns: | |||
If neither input nor output is present ASE_NotPresent | |||
will be returned. | |||
ASE_NoMemory, ASE_HWMalfunction are other possible error conditions | |||
*/ | |||
ASIOError ASIOExit(void); | |||
/* Purpose: | |||
Terminates the AudioStreamIO. | |||
Parameter: | |||
None. | |||
Returns: | |||
If neither input nor output is present ASE_NotPresent | |||
will be returned. | |||
Notes: this implies ASIOStop() and ASIODisposeBuffers(), | |||
meaning that no host callbacks must be accessed after ASIOExit(). | |||
*/ | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// Start/Stop | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
ASIOError ASIOStart(void); | |||
/* Purpose: | |||
Start input and output processing synchronously. | |||
This will | |||
- reset the sample counter to zero | |||
- start the hardware (both input and output) | |||
The first call to the hosts' bufferSwitch(index == 0) then tells | |||
the host to read from input buffer A (index 0), and start | |||
processing to output buffer A while output buffer B (which | |||
has been filled by the host prior to calling ASIOStart()) | |||
is possibly sounding (see also ASIOGetLatencies()) | |||
Parameter: | |||
None. | |||
Returns: | |||
If neither input nor output is present, ASE_NotPresent | |||
will be returned. | |||
If the hardware fails to start, ASE_HWMalfunction will be returned. | |||
Notes: | |||
There is no restriction on the time that ASIOStart() takes | |||
to perform (that is, it is not considered a realtime trigger). | |||
*/ | |||
ASIOError ASIOStop(void); | |||
/* Purpose: | |||
Stops input and output processing altogether. | |||
Parameter: | |||
None. | |||
Returns: | |||
If neither input nor output is present ASE_NotPresent | |||
will be returned. | |||
Notes: | |||
On return from ASIOStop(), the driver must in no | |||
case call the hosts' bufferSwitch() routine. | |||
*/ | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// Inquiry methods and sample rate | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels); | |||
/* Purpose: | |||
Returns number of individual input/output channels. | |||
Parameter: | |||
numInputChannels will hold the number of available input channels | |||
numOutputChannels will hold the number of available output channels | |||
Returns: | |||
If no input/output is present ASE_NotPresent will be returned. | |||
If only inputs, or only outputs are available, the according | |||
other parameter will be zero, and ASE_OK is returned. | |||
*/ | |||
ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency); | |||
/* Purpose: | |||
Returns the input and output latencies. This includes | |||
device specific delays, like FIFOs etc. | |||
Parameter: | |||
inputLatency will hold the 'age' of the first sample frame | |||
in the input buffer when the hosts reads it in bufferSwitch() | |||
(this is theoretical, meaning it does not include the overhead | |||
and delay between the actual physical switch, and the time | |||
when bufferSitch() enters). | |||
This will usually be the size of one block in sample frames, plus | |||
device specific latencies. | |||
outputLatency will specify the time between the buffer switch, | |||
and the time when the next play buffer will start to sound. | |||
The next play buffer is defined as the one the host starts | |||
processing after (or at) bufferSwitch(), indicated by the | |||
index parameter (0 for buffer A, 1 for buffer B). | |||
It will usually be either one block, if the host writes directly | |||
to a dma buffer, or two or more blocks if the buffer is 'latched' by | |||
the driver. As an example, on ASIOStart(), the host will have filled | |||
the play buffer at index 1 already; when it gets the callback (with | |||
the parameter index == 0), this tells it to read from the input | |||
buffer 0, and start to fill the play buffer 0 (assuming that now | |||
play buffer 1 is already sounding). In this case, the output | |||
latency is one block. If the driver decides to copy buffer 1 | |||
at that time, and pass it to the hardware at the next slot (which | |||
is most commonly done, but should be avoided), the output latency | |||
becomes two blocks instead, resulting in a total i/o latency of at least | |||
3 blocks. As memory access is the main bottleneck in native dsp processing, | |||
and to acheive less latency, it is highly recommended to try to avoid | |||
copying (this is also why the driver is the owner of the buffers). To | |||
summarize, the minimum i/o latency can be acheived if the input buffer | |||
is processed by the host into the output buffer which will physically | |||
start to sound on the next time slice. Also note that the host expects | |||
the bufferSwitch() callback to be accessed for each time slice in order | |||
to retain sync, possibly recursively; if it fails to process a block in | |||
time, it will suspend its operation for some time in order to recover. | |||
Returns: | |||
If no input/output is present ASE_NotPresent will be returned. | |||
*/ | |||
ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity); | |||
/* Purpose: | |||
Returns min, max, and preferred buffer sizes for input/output | |||
Parameter: | |||
minSize will hold the minimum buffer size | |||
maxSize will hold the maxium possible buffer size | |||
preferredSize will hold the preferred buffer size (a size which | |||
best fits performance and hardware requirements) | |||
granularity will hold the granularity at which buffer sizes | |||
may differ. Usually, the buffer size will be a power of 2; | |||
in this case, granularity will hold -1 on return, signalling | |||
possible buffer sizes starting from minSize, increased in | |||
powers of 2 up to maxSize. | |||
Returns: | |||
If no input/output is present ASE_NotPresent will be returned. | |||
Notes: | |||
When minimum and maximum buffer size are equal, | |||
the preferred buffer size has to be the same value as well; granularity | |||
should be 0 in this case. | |||
*/ | |||
ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate); | |||
/* Purpose: | |||
Inquires the hardware for the available sample rates. | |||
Parameter: | |||
sampleRate is the rate in question. | |||
Returns: | |||
If the inquired sample rate is not supported, ASE_NoClock will be returned. | |||
If no input/output is present ASE_NotPresent will be returned. | |||
*/ | |||
ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate); | |||
/* Purpose: | |||
Get the current sample Rate. | |||
Parameter: | |||
currentRate will hold the current sample rate on return. | |||
Returns: | |||
If sample rate is unknown, sampleRate will be 0 and ASE_NoClock will be returned. | |||
If no input/output is present ASE_NotPresent will be returned. | |||
Notes: | |||
*/ | |||
ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate); | |||
/* Purpose: | |||
Set the hardware to the requested sample Rate. If sampleRate == 0, | |||
enable external sync. | |||
Parameter: | |||
sampleRate: on input, the requested rate | |||
Returns: | |||
If sampleRate is unknown ASE_NoClock will be returned. | |||
If the current clock is external, and sampleRate is != 0, | |||
ASE_InvalidMode will be returned | |||
If no input/output is present ASE_NotPresent will be returned. | |||
Notes: | |||
*/ | |||
typedef struct ASIOClockSource | |||
{ | |||
long index; // as used for ASIOSetClockSource() | |||
long associatedChannel; // for instance, S/PDIF or AES/EBU | |||
long associatedGroup; // see channel groups (ASIOGetChannelInfo()) | |||
ASIOBool isCurrentSource; // ASIOTrue if this is the current clock source | |||
char name[32]; // for user selection | |||
} ASIOClockSource; | |||
ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources); | |||
/* Purpose: | |||
Get the available external audio clock sources | |||
Parameter: | |||
clocks points to an array of ASIOClockSource structures: | |||
- index: this is used to identify the clock source | |||
when ASIOSetClockSource() is accessed, should be | |||
an index counting from zero | |||
- associatedInputChannel: the first channel of an associated | |||
input group, if any. | |||
- associatedGroup: the group index of that channel. | |||
groups of channels are defined to seperate for | |||
instance analog, S/PDIF, AES/EBU, ADAT connectors etc, | |||
when present simultaniously. Note that associated channel | |||
is enumerated according to numInputs/numOutputs, means it | |||
is independant from a group (see also ASIOGetChannelInfo()) | |||
inputs are associated to a clock if the physical connection | |||
transfers both data and clock (like S/PDIF, AES/EBU, or | |||
ADAT inputs). if there is no input channel associated with | |||
the clock source (like Word Clock, or internal oscillator), both | |||
associatedChannel and associatedGroup should be set to -1. | |||
- isCurrentSource: on exit, ASIOTrue if this is the current clock | |||
source, ASIOFalse else | |||
- name: a null-terminated string for user selection of the available sources. | |||
numSources: | |||
on input: the number of allocated array members | |||
on output: the number of available clock sources, at least | |||
1 (internal clock generator). | |||
Returns: | |||
If no input/output is present ASE_NotPresent will be returned. | |||
Notes: | |||
*/ | |||
ASIOError ASIOSetClockSource(long index); | |||
/* Purpose: | |||
Set the audio clock source | |||
Parameter: | |||
index as obtained from an inquiry to ASIOGetClockSources() | |||
Returns: | |||
If no input/output is present ASE_NotPresent will be returned. | |||
If the clock can not be selected because an input channel which | |||
carries the current clock source is active, ASE_InvalidMode | |||
*may* be returned (this depends on the properties of the driver | |||
and/or hardware). | |||
Notes: | |||
Should *not* return ASE_NoClock if there is no clock signal present | |||
at the selected source; this will be inquired via ASIOGetSampleRate(). | |||
It should call the host callback procedure sampleRateHasChanged(), | |||
if the switch causes a sample rate change, or if no external clock | |||
is present at the selected source. | |||
*/ | |||
ASIOError ASIOGetSamplePosition (ASIOSamples *sPos, ASIOTimeStamp *tStamp); | |||
/* Purpose: | |||
Inquires the sample position/time stamp pair. | |||
Parameter: | |||
sPos will hold the sample position on return. The sample | |||
position is reset to zero when ASIOStart() gets called. | |||
tStamp will hold the system time when the sample position | |||
was latched. | |||
Returns: | |||
If no input/output is present, ASE_NotPresent will be returned. | |||
If there is no clock, ASE_SPNotAdvancing will be returned. | |||
Notes: | |||
in order to be able to synchronise properly, | |||
the sample position / time stamp pair must refer to the current block, | |||
that is, the engine will call ASIOGetSamplePosition() in its bufferSwitch() | |||
callback and expect the time for the current block. thus, when requested | |||
in the very first bufferSwitch after ASIO_Start(), the sample position | |||
should be zero, and the time stamp should refer to the very time where | |||
the stream was started. it also means that the sample position must be | |||
block aligned. the driver must ensure proper interpolation if the system | |||
time can not be determined for the block position. the driver is responsible | |||
for precise time stamps as it usually has most direct access to lower | |||
level resources. proper behaviour of ASIO_GetSamplePosition() and ASIO_GetLatencies() | |||
are essential for precise media synchronization! | |||
*/ | |||
typedef struct ASIOChannelInfo | |||
{ | |||
long channel; // on input, channel index | |||
ASIOBool isInput; // on input | |||
ASIOBool isActive; // on exit | |||
long channelGroup; // dto | |||
ASIOSampleType type; // dto | |||
char name[32]; // dto | |||
} ASIOChannelInfo; | |||
ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info); | |||
/* Purpose: | |||
retreive information about the nature of a channel | |||
Parameter: | |||
info: pointer to a ASIOChannelInfo structure with | |||
- channel: on input, the channel index of the channel in question. | |||
- isInput: on input, ASIOTrue if info for an input channel is | |||
requested, else output | |||
- channelGroup: on return, the channel group that the channel | |||
belongs to. For drivers which support different types of | |||
channels, like analog, S/PDIF, AES/EBU, ADAT etc interfaces, | |||
there should be a reasonable grouping of these types. Groups | |||
are always independant form a channel index, that is, a channel | |||
index always counts from 0 to numInputs/numOutputs regardless | |||
of the group it may belong to. | |||
There will always be at least one group (group 0). Please | |||
also note that by default, the host may decide to activate | |||
channels 0 and 1; thus, these should belong to the most | |||
useful type (analog i/o, if present). | |||
- type: on return, contains the sample type of the channel | |||
- isActive: on return, ASIOTrue if channel is active as it was | |||
installed by ASIOCreateBuffers(), ASIOFalse else | |||
- name: describing the type of channel in question. Used to allow | |||
for user selection, and enabling of specific channels. examples: | |||
"Analog In", "SPDIF Out" etc | |||
Returns: | |||
If no input/output is present ASE_NotPresent will be returned. | |||
Notes: | |||
If possible, the string should be organised such that the first | |||
characters are most significantly describing the nature of the | |||
port, to allow for identification even if the view showing the | |||
port name is too small to display more than 8 characters, for | |||
instance. | |||
*/ | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
// Buffer preparation | |||
//- - - - - - - - - - - - - - - - - - - - - - - - - | |||
typedef struct ASIOBufferInfo | |||
{ | |||
ASIOBool isInput; // on input: ASIOTrue: input, else output | |||
long channelNum; // on input: channel index | |||
void *buffers[2]; // on output: double buffer addresses | |||
} ASIOBufferInfo; | |||
ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels, | |||
long bufferSize, ASIOCallbacks *callbacks); | |||
/* Purpose: | |||
Allocates input/output buffers for all input and output channels to be activated. | |||
Parameter: | |||
bufferInfos is a pointer to an array of ASIOBufferInfo structures: | |||
- isInput: on input, ASIOTrue if the buffer is to be allocated | |||
for an input, output buffer else | |||
- channelNum: on input, the index of the channel in question | |||
(counting from 0) | |||
- buffers: on exit, 2 pointers to the halves of the channels' double-buffer. | |||
the size of the buffer(s) of course depend on both the ASIOSampleType | |||
as obtained from ASIOGetChannelInfo(), and bufferSize | |||
numChannels is the sum of all input and output channels to be created; | |||
thus bufferInfos is a pointer to an array of numChannels ASIOBufferInfo | |||
structures. | |||
bufferSize selects one of the possible buffer sizes as obtained from | |||
ASIOGetBufferSizes(). | |||
callbacks is a pointer to an ASIOCallbacks structure. | |||
Returns: | |||
If not enough memory is available ASE_NoMemory will be returned. | |||
If no input/output is present ASE_NotPresent will be returned. | |||
If bufferSize is not supported, or one or more of the bufferInfos elements | |||
contain invalid settings, ASE_InvalidMode will be returned. | |||
Notes: | |||
If individual channel selection is not possible but requested, | |||
the driver has to handle this. namely, bufferSwitch() will only | |||
have filled buffers of enabled outputs. If possible, processing | |||
and buss activities overhead should be avoided for channels which | |||
were not enabled here. | |||
*/ | |||
ASIOError ASIODisposeBuffers(void); | |||
/* Purpose: | |||
Releases all buffers for the device. | |||
Parameter: | |||
None. | |||
Returns: | |||
If no buffer were ever prepared, ASE_InvalidMode will be returned. | |||
If no input/output is present ASE_NotPresent will be returned. | |||
Notes: | |||
This implies ASIOStop(). | |||
*/ | |||
ASIOError ASIOControlPanel(void); | |||
/* Purpose: | |||
request the driver to start a control panel component | |||
for device specific user settings. This will not be | |||
accessed on some platforms (where the component is accessed | |||
instead). | |||
Parameter: | |||
None. | |||
Returns: | |||
If no panel is available ASE_NotPresent will be returned. | |||
Actually, the return code is ignored. | |||
Notes: | |||
if the user applied settings which require a re-configuration | |||
of parts or all of the enigine and/or driver (such as a change of | |||
the block size), the asioMessage callback can be used (see | |||
ASIO_Callbacks). | |||
*/ | |||
ASIOError ASIOFuture(long selector, void *params); | |||
/* Purpose: | |||
various | |||
Parameter: | |||
selector: operation Code as to be defined. zero is reserved for | |||
testing purposes. | |||
params: depends on the selector; usually pointer to a structure | |||
for passing and retreiving any type and amount of parameters. | |||
Returns: | |||
the return value is also selector dependant. if the selector | |||
is unknown, ASE_InvalidParameter should be returned to prevent | |||
further calls with this selector. on success, ASE_SUCCESS | |||
must be returned (note: ASE_OK is *not* sufficient!) | |||
Notes: | |||
see selectors defined below. | |||
*/ | |||
enum | |||
{ | |||
kAsioEnableTimeCodeRead = 1, // no arguments | |||
kAsioDisableTimeCodeRead, // no arguments | |||
kAsioSetInputMonitor, // ASIOInputMonitor* in params | |||
kAsioTransport, // ASIOTransportParameters* in params | |||
kAsioSetInputGain, // ASIOChannelControls* in params, apply gain | |||
kAsioGetInputMeter, // ASIOChannelControls* in params, fill meter | |||
kAsioSetOutputGain, // ASIOChannelControls* in params, apply gain | |||
kAsioGetOutputMeter, // ASIOChannelControls* in params, fill meter | |||
kAsioCanInputMonitor, // no arguments for kAsioCanXXX selectors | |||
kAsioCanTimeInfo, | |||
kAsioCanTimeCode, | |||
kAsioCanTransport, | |||
kAsioCanInputGain, | |||
kAsioCanInputMeter, | |||
kAsioCanOutputGain, | |||
kAsioCanOutputMeter | |||
}; | |||
typedef struct ASIOInputMonitor | |||
{ | |||
long input; // this input was set to monitor (or off), -1: all | |||
long output; // suggested output for monitoring the input (if so) | |||
long gain; // suggested gain, ranging 0 - 0x7fffffffL (-inf to +12 dB) | |||
ASIOBool state; // ASIOTrue => on, ASIOFalse => off | |||
long pan; // suggested pan, 0 => all left, 0x7fffffff => right | |||
} ASIOInputMonitor; | |||
typedef struct ASIOChannelControls | |||
{ | |||
long channel; // on input, channel index | |||
ASIOBool isInput; // on input | |||
long gain; // on input, ranges 0 thru 0x7fffffff | |||
long meter; // on return, ranges 0 thru 0x7fffffff | |||
char future[32]; | |||
} ASIOChannelControls; | |||
typedef struct ASIOTransportParameters | |||
{ | |||
long command; // see enum below | |||
ASIOSamples samplePosition; | |||
long track; | |||
long trackSwitches[16]; // 512 tracks on/off | |||
char future[64]; | |||
} ASIOTransportParameters; | |||
enum | |||
{ | |||
kTransStart = 1, | |||
kTransStop, | |||
kTransLocate, // to samplePosition | |||
kTransPunchIn, | |||
kTransPunchOut, | |||
kTransArmOn, // track | |||
kTransArmOff, // track | |||
kTransMonitorOn, // track | |||
kTransMonitorOff, // track | |||
kTransArm, // trackSwitches | |||
kTransMonitor // trackSwitches | |||
}; | |||
ASIOError ASIOOutputReady(void); | |||
/* Purpose: | |||
this tells the driver that the host has completed processing | |||
the output buffers. if the data format required by the hardware | |||
differs from the supported asio formats, but the hardware | |||
buffers are DMA buffers, the driver will have to convert | |||
the audio stream data; as the bufferSwitch callback is | |||
usually issued at dma block switch time, the driver will | |||
have to convert the *previous* host buffer, which increases | |||
the output latency by one block. | |||
when the host finds out that ASIOOutputReady() returns | |||
true, it will issue this call whenever it completed | |||
output processing. then the driver can convert the | |||
host data directly to the dma buffer to be played next, | |||
reducing output latency by one block. | |||
another way to look at it is, that the buffer switch is called | |||
in order to pass the *input* stream to the host, so that it can | |||
process the input into the output, and the output stream is passed | |||
to the driver when the host has completed its process. | |||
Parameter: | |||
None | |||
Returns: | |||
only if the above mentioned scenario is given, and a reduction | |||
of output latency can be acheived by this mechanism, should | |||
ASE_OK be returned. otherwise (and usually), ASE_NotPresent | |||
should be returned in order to prevent further calls to this | |||
function. note that the host may want to determine if it is | |||
to use this when the system is not yet fully initialized, so | |||
ASE_OK should always be returned if the mechanism makes sense. | |||
Notes: | |||
please remeber to adjust ASIOGetLatencies() according to | |||
whether ASIOOutputReady() was ever called or not, if your | |||
driver supports this scenario. | |||
also note that the engine may fail to call ASIO_OutputReady() | |||
in time in overload cases. as already mentioned, bufferSwitch | |||
should be called for every block regardless of whether a block | |||
could be processed in time. | |||
*/ | |||
// restore old alignment | |||
#if defined(_MSC_VER) && !defined(__MWERKS__) | |||
#pragma pack(pop) | |||
#elif PRAGMA_ALIGN_SUPPORTED | |||
#pragma options align = reset | |||
#endif | |||
#endif | |||
@@ -0,0 +1,41 @@ | |||
#ifndef __AsioDrivers__ | |||
#define __AsioDrivers__ | |||
#include "ginclude.h" | |||
#if MAC | |||
#include "CodeFragments.hpp" | |||
class AsioDrivers : public CodeFragments | |||
#elif WINDOWS | |||
#include <windows.h> | |||
#include "asiolist.h" | |||
class AsioDrivers : public AsioDriverList | |||
#elif SGI || BEOS | |||
#include "asiolist.h" | |||
class AsioDrivers : public AsioDriverList | |||
#else | |||
#error implement me | |||
#endif | |||
{ | |||
public: | |||
AsioDrivers(); | |||
~AsioDrivers(); | |||
bool getCurrentDriverName(char *name); | |||
long getDriverNames(char **names, long maxDrivers); | |||
bool loadDriver(char *name); | |||
void removeCurrentDriver(); | |||
long getCurrentDriverIndex() {return curIndex;} | |||
protected: | |||
unsigned long connID; | |||
long curIndex; | |||
}; | |||
#endif |
@@ -0,0 +1,46 @@ | |||
#ifndef __asiolist__ | |||
#define __asiolist__ | |||
#define DRVERR -5000 | |||
#define DRVERR_INVALID_PARAM DRVERR-1 | |||
#define DRVERR_DEVICE_ALREADY_OPEN DRVERR-2 | |||
#define DRVERR_DEVICE_NOT_FOUND DRVERR-3 | |||
#define MAXPATHLEN 512 | |||
#define MAXDRVNAMELEN 128 | |||
struct asiodrvstruct | |||
{ | |||
int drvID; | |||
CLSID clsid; | |||
char dllpath[MAXPATHLEN]; | |||
char drvname[MAXDRVNAMELEN]; | |||
LPVOID asiodrv; | |||
struct asiodrvstruct *next; | |||
}; | |||
typedef struct asiodrvstruct ASIODRVSTRUCT; | |||
typedef ASIODRVSTRUCT *LPASIODRVSTRUCT; | |||
class AsioDriverList { | |||
public: | |||
AsioDriverList(); | |||
~AsioDriverList(); | |||
LONG asioOpenDriver (int,VOID **); | |||
LONG asioCloseDriver (int); | |||
// nice to have | |||
LONG asioGetNumDev (VOID); | |||
LONG asioGetDriverName (int,char *,int); | |||
LONG asioGetDriverPath (int,char *,int); | |||
LONG asioGetDriverCLSID (int,CLSID *); | |||
// or use directly access | |||
LPASIODRVSTRUCT lpdrvlist; | |||
int numdrv; | |||
}; | |||
typedef class AsioDriverList *LPASIODRIVERLIST; | |||
#endif |
@@ -0,0 +1,82 @@ | |||
#ifndef __asiosys__ | |||
#define __asiosys__ | |||
#ifdef WIN32 | |||
#undef MAC | |||
#define PPC 0 | |||
#define WINDOWS 1 | |||
#define SGI 0 | |||
#define SUN 0 | |||
#define LINUX 0 | |||
#define BEOS 0 | |||
#define NATIVE_INT64 0 | |||
#define IEEE754_64FLOAT 1 | |||
#elif BEOS | |||
#define MAC 0 | |||
#define PPC 0 | |||
#define WINDOWS 0 | |||
#define PC 0 | |||
#define SGI 0 | |||
#define SUN 0 | |||
#define LINUX 0 | |||
#define NATIVE_INT64 0 | |||
#define IEEE754_64FLOAT 1 | |||
#ifndef DEBUG | |||
#define DEBUG 0 | |||
#if DEBUG | |||
void DEBUGGERMESSAGE(char *string); | |||
#else | |||
#define DEBUGGERMESSAGE(a) | |||
#endif | |||
#endif | |||
#elif SGI | |||
#define MAC 0 | |||
#define PPC 0 | |||
#define WINDOWS 0 | |||
#define PC 0 | |||
#define SUN 0 | |||
#define LINUX 0 | |||
#define BEOS 0 | |||
#define NATIVE_INT64 0 | |||
#define IEEE754_64FLOAT 1 | |||
#ifndef DEBUG | |||
#define DEBUG 0 | |||
#if DEBUG | |||
void DEBUGGERMESSAGE(char *string); | |||
#else | |||
#define DEBUGGERMESSAGE(a) | |||
#endif | |||
#endif | |||
#else // MAC | |||
#define MAC 1 | |||
#define PPC 1 | |||
#define WINDOWS 0 | |||
#define PC 0 | |||
#define SGI 0 | |||
#define SUN 0 | |||
#define LINUX 0 | |||
#define BEOS 0 | |||
#define NATIVE_INT64 0 | |||
#define IEEE754_64FLOAT 1 | |||
#ifndef DEBUG | |||
#define DEBUG 0 | |||
#if DEBUG | |||
void DEBUGGERMESSAGE(char *string); | |||
#else | |||
#define DEBUGGERMESSAGE(a) | |||
#endif | |||
#endif | |||
#endif | |||
#endif |
@@ -42,14 +42,14 @@ RSC=rc.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "call_inout - Win32 Debug" | |||
@@ -65,15 +65,15 @@ LINK32=link.exe | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -87,6 +87,18 @@ LINK32=link.exe | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\call_inout.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -99,6 +111,34 @@ SOURCE=..\..\RtAudio.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group |
@@ -42,14 +42,14 @@ RSC=rc.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "call_saw - Win32 Debug" | |||
@@ -65,15 +65,15 @@ LINK32=link.exe | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -87,6 +87,18 @@ LINK32=link.exe | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\call_saw.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -99,6 +111,34 @@ SOURCE=..\..\RtAudio.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group |
@@ -0,0 +1,38 @@ | |||
#ifndef __gInclude__ | |||
#define __gInclude__ | |||
#if SGI | |||
#undef BEOS | |||
#undef MAC | |||
#undef WINDOWS | |||
// | |||
#define ASIO_BIG_ENDIAN 1 | |||
#define ASIO_CPU_MIPS 1 | |||
#elif defined WIN32 | |||
#undef BEOS | |||
#undef MAC | |||
#undef SGI | |||
#define WINDOWS 1 | |||
#define ASIO_LITTLE_ENDIAN 1 | |||
#define ASIO_CPU_X86 1 | |||
#elif BEOS | |||
#undef MAC | |||
#undef SGI | |||
#undef WINDOWS | |||
#define ASIO_LITTLE_ENDIAN 1 | |||
#define ASIO_CPU_X86 1 | |||
// | |||
#else | |||
#define MAC 1 | |||
#undef BEOS | |||
#undef WINDOWS | |||
#undef SGI | |||
#define ASIO_BIG_ENDIAN 1 | |||
#define ASIO_CPU_PPC 1 | |||
#endif | |||
// always | |||
#define NATIVE_INT64 0 | |||
#define IEEE754_64FLOAT 1 | |||
#endif // __gInclude__ |
@@ -42,14 +42,14 @@ RSC=rc.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "in_out - Win32 Debug" | |||
@@ -65,15 +65,15 @@ LINK32=link.exe | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -87,6 +87,18 @@ LINK32=link.exe | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\in_out.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -99,6 +111,34 @@ SOURCE=..\..\RtAudio.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group |
@@ -42,14 +42,14 @@ RSC=rc.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "info - Win32 Debug" | |||
@@ -65,15 +65,15 @@ LINK32=link.exe | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -87,6 +87,18 @@ LINK32=link.exe | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\info.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -99,6 +111,34 @@ SOURCE=..\..\RtAudio.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group |
@@ -42,14 +42,14 @@ RSC=rc.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "play_raw - Win32 Debug" | |||
@@ -65,15 +65,15 @@ LINK32=link.exe | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -87,6 +87,18 @@ LINK32=link.exe | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\play_raw.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -99,6 +111,34 @@ SOURCE=..\..\RtAudio.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group |
@@ -39,9 +39,10 @@ RSC=rc.exe | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
@@ -49,7 +50,7 @@ BSC32=bscmake.exe | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "play_saw - Win32 Debug" | |||
@@ -62,9 +63,10 @@ LINK32=link.exe | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
@@ -72,7 +74,7 @@ BSC32=bscmake.exe | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -42,14 +42,14 @@ RSC=rc.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "record_raw - Win32 Debug" | |||
@@ -65,15 +65,15 @@ LINK32=link.exe | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -87,6 +87,18 @@ LINK32=link.exe | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\record_raw.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -99,6 +111,34 @@ SOURCE=..\..\RtAudio.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group |
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 | |||
############################################################################### | |||
Project: "call_inout"=.\call_inout.dsp - Package Owner=<4> | |||
Project: "call_inout"=".\call_inout.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
@@ -15,7 +15,7 @@ Package=<4> | |||
############################################################################### | |||
Project: "call_saw"=.\call_saw.dsp - Package Owner=<4> | |||
Project: "call_saw"=".\call_saw.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
@@ -27,7 +27,7 @@ Package=<4> | |||
############################################################################### | |||
Project: "in_out"=.\in_out.dsp - Package Owner=<4> | |||
Project: "in_out"=".\in_out.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
@@ -39,7 +39,7 @@ Package=<4> | |||
############################################################################### | |||
Project: "info"=.\info.dsp - Package Owner=<4> | |||
Project: "info"=".\info.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
@@ -51,7 +51,7 @@ Package=<4> | |||
############################################################################### | |||
Project: "play_raw"=.\play_raw.dsp - Package Owner=<4> | |||
Project: "play_raw"=".\play_raw.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
@@ -63,7 +63,7 @@ Package=<4> | |||
############################################################################### | |||
Project: "play_saw"=.\play_saw.dsp - Package Owner=<4> | |||
Project: "play_saw"=".\play_saw.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
@@ -75,7 +75,19 @@ Package=<4> | |||
############################################################################### | |||
Project: "record_raw"=.\record_raw.dsp - Package Owner=<4> | |||
Project: "record_raw"=".\record_raw.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ | |||
}}} | |||
Package=<4> | |||
{{{ | |||
}}} | |||
############################################################################### | |||
Project: "twostreams"=".\twostreams.dsp" - Package Owner=<4> | |||
Package=<5> | |||
{{{ |
@@ -42,14 +42,14 @@ RSC=rc.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c | |||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "twostreams - Win32 Debug" | |||
@@ -65,15 +65,15 @@ LINK32=link.exe | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
@@ -87,18 +87,58 @@ LINK32=link.exe | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=..\twostreams.cpp | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\twostreams.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group |
@@ -1,148 +0,0 @@ | |||
# Microsoft Developer Studio Project File - Name="call_inout" - Package Owner=<4> | |||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 | |||
# ** DO NOT EDIT ** | |||
# TARGTYPE "Win32 (x86) Console Application" 0x0103 | |||
CFG=call_inout - Win32 Debug | |||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, | |||
!MESSAGE use the Export Makefile command and run | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "call_inout.mak". | |||
!MESSAGE | |||
!MESSAGE You can specify a configuration when running NMAKE | |||
!MESSAGE by defining the macro CFG on the command line. For example: | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "call_inout.mak" CFG="call_inout - Win32 Debug" | |||
!MESSAGE | |||
!MESSAGE Possible choices for configuration are: | |||
!MESSAGE | |||
!MESSAGE "call_inout - Win32 Release" (based on "Win32 (x86) Console Application") | |||
!MESSAGE "call_inout - Win32 Debug" (based on "Win32 (x86) Console Application") | |||
!MESSAGE | |||
# Begin Project | |||
# PROP AllowPerConfigDependencies 0 | |||
# PROP Scc_ProjName "" | |||
# PROP Scc_LocalPath "" | |||
CPP=cl.exe | |||
RSC=rc.exe | |||
!IF "$(CFG)" == "call_inout - Win32 Release" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 0 | |||
# PROP BASE Output_Dir "Release" | |||
# PROP BASE Intermediate_Dir "Release" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "call_inout - Win32 Debug" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 1 | |||
# PROP BASE Output_Dir "Debug" | |||
# PROP BASE Intermediate_Dir "Debug" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
# Begin Target | |||
# Name "call_inout - Win32 Release" | |||
# Name "call_inout - Win32 Debug" | |||
# Begin Group "Source Files" | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\call_inout.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group | |||
# Begin Group "Resource Files" | |||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | |||
# End Group | |||
# End Target | |||
# End Project |
@@ -1,148 +0,0 @@ | |||
# Microsoft Developer Studio Project File - Name="call_saw" - Package Owner=<4> | |||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 | |||
# ** DO NOT EDIT ** | |||
# TARGTYPE "Win32 (x86) Console Application" 0x0103 | |||
CFG=call_saw - Win32 Debug | |||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, | |||
!MESSAGE use the Export Makefile command and run | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "call_saw.mak". | |||
!MESSAGE | |||
!MESSAGE You can specify a configuration when running NMAKE | |||
!MESSAGE by defining the macro CFG on the command line. For example: | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "call_saw.mak" CFG="call_saw - Win32 Debug" | |||
!MESSAGE | |||
!MESSAGE Possible choices for configuration are: | |||
!MESSAGE | |||
!MESSAGE "call_saw - Win32 Release" (based on "Win32 (x86) Console Application") | |||
!MESSAGE "call_saw - Win32 Debug" (based on "Win32 (x86) Console Application") | |||
!MESSAGE | |||
# Begin Project | |||
# PROP AllowPerConfigDependencies 0 | |||
# PROP Scc_ProjName "" | |||
# PROP Scc_LocalPath "" | |||
CPP=cl.exe | |||
RSC=rc.exe | |||
!IF "$(CFG)" == "call_saw - Win32 Release" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 0 | |||
# PROP BASE Output_Dir "Release" | |||
# PROP BASE Intermediate_Dir "Release" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "call_saw - Win32 Debug" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 1 | |||
# PROP BASE Output_Dir "Debug" | |||
# PROP BASE Intermediate_Dir "Debug" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
# Begin Target | |||
# Name "call_saw - Win32 Release" | |||
# Name "call_saw - Win32 Debug" | |||
# Begin Group "Source Files" | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\call_saw.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group | |||
# Begin Group "Resource Files" | |||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | |||
# End Group | |||
# End Target | |||
# End Project |
@@ -1,148 +0,0 @@ | |||
# Microsoft Developer Studio Project File - Name="in_out" - Package Owner=<4> | |||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 | |||
# ** DO NOT EDIT ** | |||
# TARGTYPE "Win32 (x86) Console Application" 0x0103 | |||
CFG=in_out - Win32 Debug | |||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, | |||
!MESSAGE use the Export Makefile command and run | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "in_out.mak". | |||
!MESSAGE | |||
!MESSAGE You can specify a configuration when running NMAKE | |||
!MESSAGE by defining the macro CFG on the command line. For example: | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "in_out.mak" CFG="in_out - Win32 Debug" | |||
!MESSAGE | |||
!MESSAGE Possible choices for configuration are: | |||
!MESSAGE | |||
!MESSAGE "in_out - Win32 Release" (based on "Win32 (x86) Console Application") | |||
!MESSAGE "in_out - Win32 Debug" (based on "Win32 (x86) Console Application") | |||
!MESSAGE | |||
# Begin Project | |||
# PROP AllowPerConfigDependencies 0 | |||
# PROP Scc_ProjName "" | |||
# PROP Scc_LocalPath "" | |||
CPP=cl.exe | |||
RSC=rc.exe | |||
!IF "$(CFG)" == "in_out - Win32 Release" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 0 | |||
# PROP BASE Output_Dir "Release" | |||
# PROP BASE Intermediate_Dir "Release" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "in_out - Win32 Debug" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 1 | |||
# PROP BASE Output_Dir "Debug" | |||
# PROP BASE Intermediate_Dir "Debug" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
# Begin Target | |||
# Name "in_out - Win32 Release" | |||
# Name "in_out - Win32 Debug" | |||
# Begin Group "Source Files" | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\in_out.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group | |||
# Begin Group "Resource Files" | |||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | |||
# End Group | |||
# End Target | |||
# End Project |
@@ -1,148 +0,0 @@ | |||
# Microsoft Developer Studio Project File - Name="info" - Package Owner=<4> | |||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 | |||
# ** DO NOT EDIT ** | |||
# TARGTYPE "Win32 (x86) Console Application" 0x0103 | |||
CFG=info - Win32 Debug | |||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, | |||
!MESSAGE use the Export Makefile command and run | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "info.mak". | |||
!MESSAGE | |||
!MESSAGE You can specify a configuration when running NMAKE | |||
!MESSAGE by defining the macro CFG on the command line. For example: | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "info.mak" CFG="info - Win32 Debug" | |||
!MESSAGE | |||
!MESSAGE Possible choices for configuration are: | |||
!MESSAGE | |||
!MESSAGE "info - Win32 Release" (based on "Win32 (x86) Console Application") | |||
!MESSAGE "info - Win32 Debug" (based on "Win32 (x86) Console Application") | |||
!MESSAGE | |||
# Begin Project | |||
# PROP AllowPerConfigDependencies 0 | |||
# PROP Scc_ProjName "" | |||
# PROP Scc_LocalPath "" | |||
CPP=cl.exe | |||
RSC=rc.exe | |||
!IF "$(CFG)" == "info - Win32 Release" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 0 | |||
# PROP BASE Output_Dir "Release" | |||
# PROP BASE Intermediate_Dir "Release" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "info - Win32 Debug" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 1 | |||
# PROP BASE Output_Dir "Debug" | |||
# PROP BASE Intermediate_Dir "Debug" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
# Begin Target | |||
# Name "info - Win32 Release" | |||
# Name "info - Win32 Debug" | |||
# Begin Group "Source Files" | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\info.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group | |||
# Begin Group "Resource Files" | |||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | |||
# End Group | |||
# End Target | |||
# End Project |
@@ -1,148 +0,0 @@ | |||
# Microsoft Developer Studio Project File - Name="play_raw" - Package Owner=<4> | |||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 | |||
# ** DO NOT EDIT ** | |||
# TARGTYPE "Win32 (x86) Console Application" 0x0103 | |||
CFG=play_raw - Win32 Debug | |||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, | |||
!MESSAGE use the Export Makefile command and run | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "play_raw.mak". | |||
!MESSAGE | |||
!MESSAGE You can specify a configuration when running NMAKE | |||
!MESSAGE by defining the macro CFG on the command line. For example: | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "play_raw.mak" CFG="play_raw - Win32 Debug" | |||
!MESSAGE | |||
!MESSAGE Possible choices for configuration are: | |||
!MESSAGE | |||
!MESSAGE "play_raw - Win32 Release" (based on "Win32 (x86) Console Application") | |||
!MESSAGE "play_raw - Win32 Debug" (based on "Win32 (x86) Console Application") | |||
!MESSAGE | |||
# Begin Project | |||
# PROP AllowPerConfigDependencies 0 | |||
# PROP Scc_ProjName "" | |||
# PROP Scc_LocalPath "" | |||
CPP=cl.exe | |||
RSC=rc.exe | |||
!IF "$(CFG)" == "play_raw - Win32 Release" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 0 | |||
# PROP BASE Output_Dir "Release" | |||
# PROP BASE Intermediate_Dir "Release" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "play_raw - Win32 Debug" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 1 | |||
# PROP BASE Output_Dir "Debug" | |||
# PROP BASE Intermediate_Dir "Debug" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
# Begin Target | |||
# Name "play_raw - Win32 Release" | |||
# Name "play_raw - Win32 Debug" | |||
# Begin Group "Source Files" | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\play_raw.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group | |||
# Begin Group "Resource Files" | |||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | |||
# End Group | |||
# End Target | |||
# End Project |
@@ -1,148 +0,0 @@ | |||
# Microsoft Developer Studio Project File - Name="record_raw" - Package Owner=<4> | |||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 | |||
# ** DO NOT EDIT ** | |||
# TARGTYPE "Win32 (x86) Console Application" 0x0103 | |||
CFG=record_raw - Win32 Debug | |||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, | |||
!MESSAGE use the Export Makefile command and run | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "record_raw.mak". | |||
!MESSAGE | |||
!MESSAGE You can specify a configuration when running NMAKE | |||
!MESSAGE by defining the macro CFG on the command line. For example: | |||
!MESSAGE | |||
!MESSAGE NMAKE /f "record_raw.mak" CFG="record_raw - Win32 Debug" | |||
!MESSAGE | |||
!MESSAGE Possible choices for configuration are: | |||
!MESSAGE | |||
!MESSAGE "record_raw - Win32 Release" (based on "Win32 (x86) Console Application") | |||
!MESSAGE "record_raw - Win32 Debug" (based on "Win32 (x86) Console Application") | |||
!MESSAGE | |||
# Begin Project | |||
# PROP AllowPerConfigDependencies 0 | |||
# PROP Scc_ProjName "" | |||
# PROP Scc_LocalPath "" | |||
CPP=cl.exe | |||
RSC=rc.exe | |||
!IF "$(CFG)" == "record_raw - Win32 Release" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 0 | |||
# PROP BASE Output_Dir "Release" | |||
# PROP BASE Intermediate_Dir "Release" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 0 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Release" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | |||
# ADD CPP /nologo /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /YX /FD /c | |||
# ADD BASE RSC /l 0x409 /d "NDEBUG" | |||
# ADD RSC /l 0x409 /d "NDEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 | |||
!ELSEIF "$(CFG)" == "record_raw - Win32 Debug" | |||
# PROP BASE Use_MFC 0 | |||
# PROP BASE Use_Debug_Libraries 1 | |||
# PROP BASE Output_Dir "Debug" | |||
# PROP BASE Intermediate_Dir "Debug" | |||
# PROP BASE Target_Dir "" | |||
# PROP Use_MFC 0 | |||
# PROP Use_Debug_Libraries 1 | |||
# PROP Output_Dir "" | |||
# PROP Intermediate_Dir "Debug" | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | |||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c | |||
# ADD BASE RSC /l 0x409 /d "_DEBUG" | |||
# ADD RSC /l 0x409 /d "_DEBUG" | |||
BSC32=bscmake.exe | |||
# ADD BASE BSC32 /nologo | |||
# ADD BSC32 /nologo | |||
LINK32=link.exe | |||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | |||
!ENDIF | |||
# Begin Target | |||
# Name "record_raw - Win32 Release" | |||
# Name "record_raw - Win32 Debug" | |||
# Begin Group "Source Files" | |||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | |||
# Begin Source File | |||
SOURCE=.\asio.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\record_raw.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.cpp | |||
# End Source File | |||
# End Group | |||
# Begin Group "Header Files" | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\asio.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrivers.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiodrvr.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiolist.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\asiosys.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\ginclude.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\iasiodrv.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=..\..\RtAudio.h | |||
# End Source File | |||
# End Group | |||
# Begin Group "Resource Files" | |||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | |||
# End Group | |||
# End Target | |||
# End Project |
@@ -1,6 +1,6 @@ | |||
/******************************************/ | |||
/* | |||
call_inout.c | |||
call_inout.cpp | |||
by Gary P. Scavone, 2001 | |||
Records from default input and passes it | |||
@@ -11,36 +11,36 @@ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <iostream> | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define FORMAT RTAUDIO_SINT24 | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define FORMAT RTAUDIO_SINT8 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define FORMAT RTAUDIO_SINT16 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define FORMAT RTAUDIO_SINT32 | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define FORMAT RTAUDIO_FLOAT32 | |||
*/ | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define FORMAT RTAUDIO_FLOAT64 | |||
void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: call_inout N fs device\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
std::cout << "\nuseage: call_inout N fs device\n"; | |||
std::cout << " where N = number of channels,\n"; | |||
std::cout << " fs = the sample rate,\n"; | |||
std::cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
@@ -52,7 +52,7 @@ int inout(char *buffer, int buffer_size, void *) | |||
int main(int argc, char *argv[]) | |||
{ | |||
int stream, chans, fs, device = 0; | |||
int chans, fs, device = 0; | |||
RtAudio *audio; | |||
char input; | |||
@@ -67,32 +67,35 @@ int main(int argc, char *argv[]) | |||
// Open the realtime output device | |||
int buffer_size = 512; | |||
try { | |||
audio = new RtAudio(&stream, device, chans, device, chans, | |||
audio = new RtAudio(device, chans, device, chans, | |||
FORMAT, fs, &buffer_size, 8); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
try { | |||
audio->setStreamCallback(stream, &inout, NULL); | |||
audio->startStream(stream); | |||
audio->setStreamCallback(&inout, NULL); | |||
audio->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nRunning ... press <enter> to quit (buffer size = " << buffer_size << ").\n"; | |||
cin.get(input); | |||
std::cout << "\nRunning ... press <enter> to quit (buffer size = " << buffer_size << ").\n"; | |||
std::cin.get(input); | |||
try { | |||
audio->stopStream(stream); | |||
audio->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
} | |||
cleanup: | |||
audio->closeStream(stream); | |||
audio->closeStream(); | |||
delete audio; | |||
return 0; | |||
@@ -1,178 +0,0 @@ | |||
/******************************************/ | |||
/* | |||
call_playtwo.cpp | |||
by Gary P. Scavone, 2002. | |||
Test executable using two streams with | |||
callbacks. | |||
*/ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define SCALE 2147483647.0 | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define SCALE 127.0 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define SCALE 32767.0 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define SCALE 2147483647.0 | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define SCALE 1.0 | |||
*/ | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define SCALE 1.0 | |||
#define BASE_RATE1 0.005 | |||
#define BASE_RATE2 0.004 | |||
void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: call_twostreams N fs\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " and fs = the sample rate.\n\n"; | |||
exit(0); | |||
} | |||
int chans; | |||
int saw1(char *buffer, int buffer_size, void *data) | |||
{ | |||
int i, j; | |||
extern int chans; | |||
MY_TYPE *my_buffer = (MY_TYPE *) buffer; | |||
double *my_data = (double *) data; | |||
for (i=0; i<buffer_size; i++) { | |||
for (j=0; j<chans; j++) { | |||
*my_buffer++ = (MY_TYPE) (my_data[j] * SCALE); | |||
my_data[j] += BASE_RATE1 * (j+1+(j*0.1)); | |||
if (my_data[j] >= 1.0) my_data[j] -= 2.0; | |||
} | |||
} | |||
return 0; | |||
} | |||
int saw2(char *buffer, int buffer_size, void *data) | |||
{ | |||
int i, j; | |||
extern int chans; | |||
MY_TYPE *my_buffer = (MY_TYPE *) buffer; | |||
double *my_data = (double *) data; | |||
for (i=0; i<buffer_size; i++) { | |||
for (j=0; j<chans; j++) { | |||
*my_buffer++ = (MY_TYPE) (my_data[j] * SCALE); | |||
my_data[j] += BASE_RATE2 * (j+1+(j*0.1)); | |||
if (my_data[j] >= 1.0) my_data[j] -= 2.0; | |||
} | |||
} | |||
return 0; | |||
} | |||
int main(int argc, char *argv[]) | |||
{ | |||
int device, buffer_size, stream1 = 0, stream2 = 0, fs; | |||
double *data1 = 0; | |||
double *data2 = 0; | |||
RtAudio *audio; | |||
char input; | |||
// minimal command-line checking | |||
if (argc != 3) usage(); | |||
chans = (int) atoi(argv[1]); | |||
fs = (int) atoi(argv[2]); | |||
// Open the realtime output device | |||
buffer_size = 512; | |||
device = 0; // default device | |||
try { | |||
audio = new RtAudio(); | |||
} | |||
catch (RtError &) { | |||
exit(EXIT_FAILURE); | |||
} | |||
try { | |||
stream1 = audio->openStream(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 8); | |||
stream2 = audio->openStream(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 8); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
data1 = (double *) calloc(chans, sizeof(double)); | |||
data2 = (double *) calloc(chans, sizeof(double)); | |||
try { | |||
audio->setStreamCallback(stream1, &saw1, (void *)data1); | |||
audio->setStreamCallback(stream2, &saw2, (void *)data2); | |||
audio->startStream(stream1); | |||
audio->startStream(stream2); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
cout << "\nRunning two streams ... press <enter> to quit.\n"; | |||
cin.get(input); | |||
cout << "\nStopping both streams.\n"; | |||
try { | |||
audio->stopStream(stream1); | |||
audio->stopStream(stream2); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
cout << "\nPress <enter> to restart streams:\n"; | |||
cin.get(input); | |||
try { | |||
audio->startStream(stream1); | |||
audio->startStream(stream2); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
cout << "\nRunning two streams (quasi-duplex) ... press <enter> to quit.\n"; | |||
cin.get(input); | |||
try { | |||
audio->stopStream(stream1); | |||
audio->stopStream(stream2); | |||
} | |||
catch (RtError &) { | |||
} | |||
cleanup: | |||
audio->closeStream(stream1); | |||
audio->closeStream(stream2); | |||
delete audio; | |||
if (data1) free(data1); | |||
if (data2) free(data2); | |||
return 0; | |||
} |
@@ -10,32 +10,32 @@ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <iostream> | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define FORMAT RTAUDIO_SINT24 | |||
#define SCALE 2147483647.0 | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define FORMAT RTAUDIO_SINT8 | |||
#define SCALE 127.0 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define FORMAT RTAUDIO_SINT16 | |||
#define SCALE 32767.0 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define FORMAT RTAUDIO_SINT32 | |||
#define SCALE 2147483647.0 | |||
*/ | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define FORMAT RTAUDIO_FLOAT32 | |||
#define SCALE 1.0 | |||
/* | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define FORMAT RTAUDIO_FLOAT64 | |||
#define SCALE 1.0 | |||
*/ | |||
@@ -46,10 +46,10 @@ void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: call_saw N fs <device>\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
std::cout << "\nuseage: call_saw N fs <device>\n"; | |||
std::cout << " where N = number of channels,\n"; | |||
std::cout << " fs = the sample rate,\n"; | |||
std::cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
@@ -75,7 +75,7 @@ int saw(char *buffer, int buffer_size, void *data) | |||
int main(int argc, char *argv[]) | |||
{ | |||
int stream, buffer_size, fs, device = 0; | |||
int buffer_size, fs, device = 0; | |||
RtAudio *audio; | |||
double *data; | |||
char input; | |||
@@ -91,35 +91,38 @@ int main(int argc, char *argv[]) | |||
// Open the realtime output device | |||
buffer_size = 1024; | |||
try { | |||
audio = new RtAudio(&stream, device, chans, 0, 0, | |||
audio = new RtAudio(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 4); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
data = (double *) calloc(chans, sizeof(double)); | |||
try { | |||
audio->setStreamCallback(stream, &saw, (void *)data); | |||
audio->startStream(stream); | |||
audio->setStreamCallback(&saw, (void *)data); | |||
audio->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nPlaying ... press <enter> to quit (buffer size = " << buffer_size << ").\n"; | |||
cin.get(input); | |||
std::cout << "\nPlaying ... press <enter> to quit (buffer size = " << buffer_size << ").\n"; | |||
std::cin.get(input); | |||
// Stop the stream. | |||
try { | |||
audio->stopStream(stream); | |||
audio->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
} | |||
cleanup: | |||
audio->closeStream(stream); | |||
audio->closeStream(); | |||
delete audio; | |||
if (data) free(data); | |||
@@ -1,162 +0,0 @@ | |||
/******************************************/ | |||
/* | |||
twostreams.cpp | |||
by Gary P. Scavone, 2001 | |||
Test executable using two streams with | |||
callbacks. | |||
*/ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define SCALE 2147483647.0 | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define SCALE 127.0 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define SCALE 32767.0 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define SCALE 2147483647.0 | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define SCALE 1.0 | |||
*/ | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define SCALE 1.0 | |||
void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: call_twostreams N fs <device>\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
int chans; | |||
int in(char *buffer, int buffer_size, void *data) | |||
{ | |||
extern int chans; | |||
MY_TYPE *my_buffer = (MY_TYPE *) buffer; | |||
MY_TYPE *my_data = (MY_TYPE *) data; | |||
long buffer_bytes = buffer_size * chans * sizeof(MY_TYPE); | |||
memcpy(my_data, my_buffer, buffer_bytes); | |||
return 0; | |||
} | |||
int out(char *buffer, int buffer_size, void *data) | |||
{ | |||
extern int chans; | |||
MY_TYPE *my_buffer = (MY_TYPE *) buffer; | |||
MY_TYPE *my_data = (MY_TYPE *) data; | |||
long buffer_bytes = buffer_size * chans * sizeof(MY_TYPE); | |||
memcpy(my_buffer, my_data, buffer_bytes); | |||
return 0; | |||
} | |||
int main(int argc, char *argv[]) | |||
{ | |||
int buffer_size, stream1 = 0, stream2 = 0, fs, device = 0; | |||
MY_TYPE *data = 0; | |||
RtAudio *audio; | |||
char input; | |||
// minimal command-line checking | |||
if (argc != 3 && argc != 4 ) usage(); | |||
chans = (int) atoi(argv[1]); | |||
fs = (int) atoi(argv[2]); | |||
if ( argc == 4 ) | |||
device = (int) atoi(argv[3]); | |||
// Open the realtime output device | |||
buffer_size = 512; | |||
try { | |||
audio = new RtAudio(); | |||
} | |||
catch (RtError &) { | |||
exit(EXIT_FAILURE); | |||
} | |||
try { | |||
stream1 = audio->openStream(0, 0, device, chans, | |||
FORMAT, fs, &buffer_size, 8); | |||
stream2 = audio->openStream(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 8); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
data = (MY_TYPE *) calloc(chans*buffer_size, sizeof(MY_TYPE)); | |||
try { | |||
audio->setStreamCallback(stream1, &in, (void *)data); | |||
audio->setStreamCallback(stream2, &out, (void *)data); | |||
audio->startStream(stream1); | |||
audio->startStream(stream2); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
cout << "\nRunning two streams (quasi-duplex) ... press <enter> to quit.\n"; | |||
cin.get(input); | |||
cout << "\nStopping both streams.\n"; | |||
try { | |||
audio->stopStream(stream1); | |||
audio->stopStream(stream2); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
cout << "\nPress <enter> to restart streams:\n"; | |||
cin.get(input); | |||
try { | |||
audio->startStream(stream1); | |||
audio->startStream(stream2); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
} | |||
cout << "\nRunning two streams (quasi-duplex) ... press <enter> to quit.\n"; | |||
cin.get(input); | |||
try { | |||
audio->stopStream(stream1); | |||
audio->stopStream(stream2); | |||
} | |||
catch (RtError &) { | |||
} | |||
cleanup: | |||
audio->closeStream(stream1); | |||
audio->closeStream(stream2); | |||
delete audio; | |||
if (data) free(data); | |||
return 0; | |||
} |
@@ -11,27 +11,27 @@ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <iostream> | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define FORMAT RTAUDIO_SINT24 | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define FORMAT RTAUDIO_SINT8 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define FORMAT RTAUDIO_SINT16 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define FORMAT RTAUDIO_SINT32 | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define FORMAT RTAUDIO_FLOAT32 | |||
*/ | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define FORMAT RTAUDIO_FLOAT64 | |||
#define TIME 4.0 | |||
@@ -39,16 +39,16 @@ void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: in_out N fs <device>\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
std::cout << "\nuseage: in_out N fs <device>\n"; | |||
std::cout << " where N = number of channels,\n"; | |||
std::cout << " fs = the sample rate,\n"; | |||
std::cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
int main(int argc, char *argv[]) | |||
{ | |||
int chans, fs, buffer_size, stream, device = 0; | |||
int chans, fs, buffer_size, device = 0; | |||
long frames, counter = 0; | |||
MY_TYPE *buffer; | |||
RtAudio *audio; | |||
@@ -64,43 +64,47 @@ int main(int argc, char *argv[]) | |||
// Open the realtime output device | |||
buffer_size = 512; | |||
try { | |||
audio = new RtAudio(&stream, device, chans, device, chans, | |||
audio = new RtAudio(device, chans, device, chans, | |||
FORMAT, fs, &buffer_size, 8); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
frames = (long) (fs * TIME); | |||
try { | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(stream); | |||
audio->startStream(stream); | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(); | |||
audio->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nRunning for " << TIME << " seconds ... fragment_size = " << buffer_size << endl; | |||
std::cout << "\nRunning for " << TIME << " seconds ... fragment_size = " << buffer_size << std::endl; | |||
while (counter < frames) { | |||
try { | |||
audio->tickStream(stream); | |||
audio->tickStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
counter += buffer_size; | |||
} | |||
try { | |||
audio->stopStream(stream); | |||
audio->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
} | |||
cleanup: | |||
audio->closeStream(stream); | |||
audio->closeStream(); | |||
delete audio; | |||
return 0; | |||
@@ -8,61 +8,70 @@ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <iostream> | |||
int main(int argc, char *argv[]) | |||
{ | |||
RtAudio *audio; | |||
RtAudio::RTAUDIO_DEVICE my_info; | |||
RtAudioDeviceInfo info; | |||
try { | |||
audio = new RtAudio(); | |||
} | |||
catch (RtError &m) { | |||
m.printMessage(); | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
int devices = audio->getDeviceCount(); | |||
cout << "\nFound " << devices << " devices ...\n"; | |||
std::cout << "\nFound " << devices << " device(s) ...\n"; | |||
for (int i=1; i<=devices; i++) { | |||
try { | |||
audio->getDeviceInfo(i, &my_info); | |||
info = audio->getDeviceInfo(i); | |||
} | |||
catch (RtError &m) { | |||
m.printMessage(); | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
break; | |||
} | |||
cout << "\nname = " << my_info.name << '\n'; | |||
if (my_info.probed == true) { | |||
cout << "probe successful\n"; | |||
cout << "maxOutputChans = " << my_info.maxOutputChannels << '\n'; | |||
cout << "minOutputChans = " << my_info.minOutputChannels << '\n'; | |||
cout << "maxInputChans = " << my_info.maxInputChannels << '\n'; | |||
cout << "minInputChans = " << my_info.minInputChannels << '\n'; | |||
cout << "maxDuplexChans = " << my_info.maxDuplexChannels << '\n'; | |||
cout << "minDuplexChans = " << my_info.minDuplexChannels << '\n'; | |||
if (my_info.hasDuplexSupport) cout << "duplex support = true\n"; | |||
else cout << "duplex support = false\n"; | |||
if (my_info.isDefault) cout << "is default device = true\n"; | |||
else cout << "is default device = false\n"; | |||
cout << "format = " << my_info.nativeFormats << '\n'; | |||
if (my_info.nSampleRates == -1) { | |||
cout << "min_srate = " << my_info.sampleRates[0]; | |||
cout << ", max_srate = " << my_info.sampleRates[1] << '\n'; | |||
std::cout << "\nDevice Name = " << info.name << '\n'; | |||
if (info.probed == false) | |||
std::cout << "Probe Status = UNsuccessful\n"; | |||
else { | |||
std::cout << "Probe Status = Successful\n"; | |||
std::cout << "Output Channels = " << info.outputChannels << '\n'; | |||
std::cout << "Input Channels = " << info.inputChannels << '\n'; | |||
std::cout << "Duplex Channels = " << info.duplexChannels << '\n'; | |||
if (info.isDefault) std::cout << "This is the default device.\n"; | |||
else std::cout << "This is NOT the default device.\n"; | |||
if ( info.nativeFormats == 0 ) | |||
std::cout << "No natively supported data formats(?)!"; | |||
else { | |||
std::cout << "Natively supported data formats:\n"; | |||
if ( info.nativeFormats & RTAUDIO_SINT8 ) | |||
std::cout << " 8-bit int\n"; | |||
if ( info.nativeFormats & RTAUDIO_SINT16 ) | |||
std::cout << " 16-bit int\n"; | |||
if ( info.nativeFormats & RTAUDIO_SINT24 ) | |||
std::cout << " 24-bit int\n"; | |||
if ( info.nativeFormats & RTAUDIO_SINT32 ) | |||
std::cout << " 32-bit int\n"; | |||
if ( info.nativeFormats & RTAUDIO_FLOAT32 ) | |||
std::cout << " 32-bit float\n"; | |||
if ( info.nativeFormats & RTAUDIO_FLOAT64 ) | |||
std::cout << " 64-bit float\n"; | |||
} | |||
if ( info.sampleRates.size() < 1 ) | |||
std::cout << "No supported sample rates found!"; | |||
else { | |||
cout << "sample rates = "; | |||
for (int j=0; j<my_info.nSampleRates; j++) | |||
cout << my_info.sampleRates[j] << " "; | |||
cout << endl; | |||
std::cout << "Supported sample rates = "; | |||
for (unsigned int j=0; j<info.sampleRates.size(); j++) | |||
std::cout << info.sampleRates[j] << " "; | |||
} | |||
std::cout << std::endl; | |||
} | |||
else | |||
cout << "probe unsuccessful\n"; | |||
} | |||
cout << endl; | |||
std::cout << std::endl; | |||
delete audio; | |||
return 0; | |||
@@ -10,34 +10,34 @@ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <iostream> | |||
#include <stdio.h> | |||
/* | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define FORMAT RTAUDIO_SINT8 | |||
#define SCALE 127.0 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define FORMAT RTAUDIO_SINT16 | |||
#define SCALE 32767.0 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define FORMAT RTAUDIO_SINT24 | |||
#define SCALE 8388607.0 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define FORMAT RTAUDIO_SINT32 | |||
#define SCALE 2147483647.0 | |||
*/ | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define FORMAT RTAUDIO_FLOAT32 | |||
#define SCALE 1.0; | |||
/* | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define FORMAT RTAUDIO_FLOAT64 | |||
#define SCALE 1.0; | |||
*/ | |||
@@ -45,17 +45,17 @@ void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: play_raw N fs file <device>\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate, \n"; | |||
cout << " file = the raw file to play,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
std::cout << "\nuseage: play_raw N fs file <device>\n"; | |||
std::cout << " where N = number of channels,\n"; | |||
std::cout << " fs = the sample rate, \n"; | |||
std::cout << " file = the raw file to play,\n"; | |||
std::cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
int main(int argc, char *argv[]) | |||
{ | |||
int chans, fs, buffer_size, count, stream, device = 0; | |||
int chans, fs, buffer_size, count, device = 0; | |||
long counter = 0; | |||
MY_TYPE *buffer; | |||
char *file; | |||
@@ -73,26 +73,28 @@ int main(int argc, char *argv[]) | |||
fd = fopen(file,"rb"); | |||
if (!fd) { | |||
cout << "can't find file!\n"; | |||
std::cout << "can't find file!\n"; | |||
exit(0); | |||
} | |||
// Open the realtime output device | |||
buffer_size = 512; | |||
try { | |||
audio = new RtAudio(&stream, device, chans, 0, 0, | |||
audio = new RtAudio(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 2); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
fclose(fd); | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
try { | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(stream); | |||
audio->startStream(stream); | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(); | |||
audio->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
@@ -101,9 +103,10 @@ int main(int argc, char *argv[]) | |||
if (count == buffer_size) { | |||
try { | |||
audio->tickStream(stream); | |||
audio->tickStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
} | |||
@@ -114,13 +117,14 @@ int main(int argc, char *argv[]) | |||
} | |||
try { | |||
audio->stopStream(stream); | |||
audio->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
} | |||
cleanup: | |||
audio->closeStream(stream); | |||
audio->closeStream(); | |||
delete audio; | |||
fclose(fd); | |||
@@ -10,57 +10,56 @@ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <iostream> | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define FORMAT RTAUDIO_SINT24 | |||
#define SCALE 2147483647.0 | |||
*/ | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define FORMAT RTAUDIO_SINT8 | |||
#define SCALE 127.0 | |||
*/ | |||
/* | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define FORMAT RTAUDIO_SINT16 | |||
#define SCALE 32767.0 | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define FORMAT RTAUDIO_SINT32 | |||
#define SCALE 2147483647.0 | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define FORMAT RTAUDIO_FLOAT32 | |||
#define SCALE 1.0 | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define FORMAT RTAUDIO_FLOAT64 | |||
#define SCALE 1.0 | |||
*/ | |||
#define BASE_RATE 0.005 | |||
#define TIME 1.0 | |||
#define TIME 4.0 | |||
void usage(void) { | |||
// Error function in case of incorrect command-line | |||
// argument specifications. | |||
cout << "\nuseage: play_saw N fs <device>\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
std::cout << "\nuseage: play_saw N fs <device>\n"; | |||
std::cout << " where N = number of channels,\n"; | |||
std::cout << " fs = the sample rate,\n"; | |||
std::cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
int main(int argc, char *argv[]) | |||
{ | |||
int chans, fs, buffer_size, stream, device = 0; | |||
int chans, fs, buffer_size, device = 0; | |||
long frames, counter = 0, i, j; | |||
MY_TYPE *buffer; | |||
RtAudio *audio; | |||
double *data; | |||
double *data = 0; | |||
// minimal command-line checking | |||
if (argc != 3 && argc != 4 ) usage(); | |||
@@ -73,10 +72,11 @@ int main(int argc, char *argv[]) | |||
// Open the realtime output device | |||
buffer_size = 512; | |||
try { | |||
audio = new RtAudio(&stream, device, chans, 0, 0, | |||
audio = new RtAudio(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 4); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
@@ -84,14 +84,15 @@ int main(int argc, char *argv[]) | |||
data = (double *) calloc(chans, sizeof(double)); | |||
try { | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(stream); | |||
audio->startStream(stream); | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(); | |||
audio->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nPlaying for " << TIME << " seconds ... buffer size = " << buffer_size << "." << endl; | |||
std::cout << "\nPlaying for " << TIME << " seconds ... buffer size = " << buffer_size << "." << std::endl; | |||
while (counter < frames) { | |||
for (i=0; i<buffer_size; i++) { | |||
for (j=0; j<chans; j++) { | |||
@@ -102,10 +103,10 @@ int main(int argc, char *argv[]) | |||
} | |||
try { | |||
//cout << "frames until no block = " << audio->streamWillBlock(stream) << endl; | |||
audio->tickStream(stream); | |||
audio->tickStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
@@ -113,13 +114,14 @@ int main(int argc, char *argv[]) | |||
} | |||
try { | |||
audio->stopStream(stream); | |||
audio->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
} | |||
cleanup: | |||
audio->closeStream(stream); | |||
audio->closeStream(); | |||
delete audio; | |||
if (data) free(data); | |||
@@ -10,29 +10,29 @@ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <iostream> | |||
#include <stdio.h> | |||
/* | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define FORMAT RTAUDIO_SINT8 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define FORMAT RTAUDIO_SINT16 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define FORMAT RTAUDIO_SINT24 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define FORMAT RTAUDIO_SINT32 | |||
*/ | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define FORMAT RTAUDIO_FLOAT32 | |||
/* | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define FORMAT RTAUDIO_FLOAT64 | |||
*/ | |||
#define TIME 2.0 | |||
@@ -41,16 +41,16 @@ void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: record_raw N fs <device>\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
std::cout << "\nuseage: record_raw N fs <device>\n"; | |||
std::cout << " where N = number of channels,\n"; | |||
std::cout << " fs = the sample rate,\n"; | |||
std::cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
int main(int argc, char *argv[]) | |||
{ | |||
int chans, fs, buffer_size, stream, device = 0; | |||
int chans, fs, buffer_size, device = 0; | |||
long frames, counter = 0; | |||
MY_TYPE *buffer; | |||
FILE *fd; | |||
@@ -67,10 +67,11 @@ int main(int argc, char *argv[]) | |||
// Open the realtime output device | |||
buffer_size = 512; | |||
try { | |||
audio = new RtAudio(&stream, 0, 0, device, chans, | |||
audio = new RtAudio(0, 0, device, chans, | |||
FORMAT, fs, &buffer_size, 8); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
@@ -78,20 +79,22 @@ int main(int argc, char *argv[]) | |||
frames = (long) (fs * TIME); | |||
try { | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(stream); | |||
audio->startStream(stream); | |||
buffer = (MY_TYPE *) audio->getStreamBuffer(); | |||
audio->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nRecording for " << TIME << " seconds ... writing file test.raw (buffer size = " << buffer_size << ")." << endl; | |||
std::cout << "\nRecording for " << TIME << " seconds ... writing file test.raw (buffer size = " << buffer_size << ")." << std::endl; | |||
while (counter < frames) { | |||
try { | |||
audio->tickStream(stream); | |||
audio->tickStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
@@ -100,13 +103,14 @@ int main(int argc, char *argv[]) | |||
} | |||
try { | |||
audio->stopStream(stream); | |||
audio->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
} | |||
cleanup: | |||
audio->closeStream(stream); | |||
audio->closeStream(); | |||
delete audio; | |||
fclose(fd); | |||
@@ -3,45 +3,43 @@ | |||
twostreams.cpp | |||
by Gary P. Scavone, 2001 | |||
Test executable for audio playback, | |||
recording, duplex operation, stopping, | |||
starting, and aborting operations. | |||
Takes number of channels and sample | |||
rate as input arguments. Runs input | |||
and output through two separate streams. | |||
Test executable for audio playback, recording, | |||
duplex operation, stopping, starting, and | |||
aborting operations. Takes number of channels | |||
and sample rate as input arguments. Runs input | |||
and output through two separate instances of RtAudio. | |||
Uses blocking functionality. | |||
*/ | |||
/******************************************/ | |||
#include "RtAudio.h" | |||
#include <iostream.h> | |||
#include <stdio.h> | |||
#include <iostream> | |||
/* | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT24 | |||
#define FORMAT RTAUDIO_SINT24 | |||
#define SCALE 2147483647.0 | |||
typedef char MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT8 | |||
#define FORMAT RTAUDIO_SINT8 | |||
#define SCALE 127.0 | |||
typedef signed short MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT16 | |||
#define FORMAT RTAUDIO_SINT16 | |||
#define SCALE 32767.0 | |||
typedef signed long MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_SINT32 | |||
#define FORMAT RTAUDIO_SINT32 | |||
#define SCALE 2147483647.0 | |||
*/ | |||
typedef float MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT32 | |||
#define FORMAT RTAUDIO_FLOAT32 | |||
#define SCALE 1.0 | |||
/* | |||
typedef double MY_TYPE; | |||
#define FORMAT RtAudio::RTAUDIO_FLOAT64 | |||
#define FORMAT RTAUDIO_FLOAT64 | |||
#define SCALE 1.0 | |||
*/ | |||
@@ -52,19 +50,19 @@ void usage(void) { | |||
/* Error function in case of incorrect command-line | |||
argument specifications | |||
*/ | |||
cout << "\nuseage: twostreams N fs <device>\n"; | |||
cout << " where N = number of channels,\n"; | |||
cout << " fs = the sample rate,\n"; | |||
cout << " and device = the device to use (default = 0).\n\n"; | |||
std::cout << "\nuseage: twostreams N fs <device>\n"; | |||
std::cout << " where N = number of channels,\n"; | |||
std::cout << " fs = the sample rate,\n"; | |||
std::cout << " and device = the device to use (default = 0).\n\n"; | |||
exit(0); | |||
} | |||
int main(int argc, char *argv[]) | |||
{ | |||
int chans, fs, buffer_size, stream1 = 0, stream2 = 0, device = 0; | |||
int chans, fs, buffer_size, device = 0; | |||
long frames, counter = 0, i, j; | |||
MY_TYPE *buffer1, *buffer2; | |||
RtAudio *audio; | |||
RtAudio *stream1, *stream2; | |||
FILE *fd; | |||
double *data = 0; | |||
@@ -79,27 +77,30 @@ int main(int argc, char *argv[]) | |||
// Open the realtime output device | |||
buffer_size = 512; | |||
try { | |||
audio = new RtAudio(); | |||
stream1 = new RtAudio(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 8); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
try { | |||
stream1 = audio->openStream(device, chans, 0, 0, | |||
FORMAT, fs, &buffer_size, 8); | |||
stream2 = audio->openStream(0, 0, device, chans, | |||
FORMAT, fs, &buffer_size, 8); | |||
stream2 = new RtAudio(0, 0, device, chans, | |||
FORMAT, fs, &buffer_size, 8); | |||
} | |||
catch (RtError &) { | |||
goto cleanup; | |||
catch (RtError &error) { | |||
delete stream1; | |||
error.printMessage(); | |||
exit(EXIT_FAILURE); | |||
} | |||
try { | |||
buffer1 = (MY_TYPE *) audio->getStreamBuffer(stream1); | |||
buffer2 = (MY_TYPE *) audio->getStreamBuffer(stream2); | |||
buffer1 = (MY_TYPE *) stream1->getStreamBuffer(); | |||
buffer2 = (MY_TYPE *) stream2->getStreamBuffer(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
@@ -107,13 +108,14 @@ int main(int argc, char *argv[]) | |||
data = (double *) calloc(chans, sizeof(double)); | |||
try { | |||
audio->startStream(stream1); | |||
stream1->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
cout << "\nStarting sawtooth playback stream for " << TIME << " seconds." << endl; | |||
std::cout << "\nStarting sawtooth playback stream for " << TIME << " seconds." << std::endl; | |||
while (counter < frames) { | |||
for (i=0; i<buffer_size; i++) { | |||
for (j=0; j<chans; j++) { | |||
@@ -124,40 +126,44 @@ int main(int argc, char *argv[]) | |||
} | |||
try { | |||
audio->tickStream(stream1); | |||
stream1->tickStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
counter += buffer_size; | |||
} | |||
cout << "\nStopping playback stream." << endl; | |||
std::cout << "\nStopping playback stream." << std::endl; | |||
try { | |||
audio->stopStream(stream1); | |||
stream1->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
fd = fopen("test.raw","wb"); | |||
try { | |||
audio->startStream(stream2); | |||
stream2->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
counter = 0; | |||
cout << "\nStarting recording stream for " << TIME << " seconds." << endl; | |||
std::cout << "\nStarting recording stream for " << TIME << " seconds." << std::endl; | |||
while (counter < frames) { | |||
try { | |||
audio->tickStream(stream2); | |||
stream2->tickStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
@@ -166,45 +172,49 @@ int main(int argc, char *argv[]) | |||
} | |||
fclose(fd); | |||
cout << "\nAborting recording." << endl; | |||
std::cout << "\nAborting recording." << std::endl; | |||
try { | |||
audio->abortStream(stream2); | |||
audio->startStream(stream1); | |||
audio->startStream(stream2); | |||
stream2->abortStream(); | |||
stream1->startStream(); | |||
stream2->startStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
counter = 0; | |||
cout << "\nStarting playback and record streams (quasi-duplex) for " << TIME << " seconds." << endl; | |||
std::cout << "\nStarting playback and record streams (quasi-duplex) for " << TIME << " seconds." << std::endl; | |||
while (counter < frames) { | |||
try { | |||
audio->tickStream(stream2); | |||
stream2->tickStream(); | |||
memcpy(buffer1, buffer2, sizeof(MY_TYPE) * chans * buffer_size); | |||
audio->tickStream(stream1); | |||
stream1->tickStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
goto cleanup; | |||
} | |||
counter += buffer_size; | |||
} | |||
cout << "\nStopping both streams." << endl; | |||
std::cout << "\nStopping both streams." << std::endl; | |||
try { | |||
audio->stopStream(stream1); | |||
audio->stopStream(stream2); | |||
stream1->stopStream(); | |||
stream2->stopStream(); | |||
} | |||
catch (RtError &) { | |||
catch (RtError &error) { | |||
error.printMessage(); | |||
} | |||
cleanup: | |||
audio->closeStream(stream1); | |||
audio->closeStream(stream2); | |||
delete audio; | |||
stream1->closeStream(); | |||
stream2->closeStream(); | |||
delete stream1; | |||
delete stream2; | |||
if (data) free(data); | |||
return 0; | |||