Browse Source

Continue work, add carla-engine

tags/1.9.4
falkTX 12 years ago
parent
commit
11e086a34c
100 changed files with 34459 additions and 171 deletions
  1. +1
    -0
      source/Makefile.mk
  2. +27
    -17
      source/backend/carla_backend.hpp
  3. +123
    -134
      source/backend/carla_engine.hpp
  4. +24
    -20
      source/backend/carla_plugin.hpp
  5. +76
    -0
      source/backend/engine/Makefile
  6. +2002
    -0
      source/backend/engine/carla_engine.cpp
  7. +74
    -0
      source/backend/engine/carla_engine.pro
  8. +159
    -0
      source/backend/engine/carla_engine_internal.hpp
  9. +687
    -0
      source/backend/engine/carla_engine_osc.cpp
  10. +169
    -0
      source/backend/engine/carla_engine_osc.hpp
  11. +158
    -0
      source/backend/engine/carla_engine_thread.cpp
  12. +77
    -0
      source/backend/engine/carla_engine_thread.hpp
  13. +1156
    -0
      source/backend/engine/jack.cpp
  14. +539
    -0
      source/backend/engine/plugin.cpp
  15. +57
    -0
      source/backend/engine/rtaudio-4.0.11/Makefile.in
  16. +8363
    -0
      source/backend/engine/rtaudio-4.0.11/RtAudio.cpp
  17. +1014
    -0
      source/backend/engine/rtaudio-4.0.11/RtAudio.h
  18. +60
    -0
      source/backend/engine/rtaudio-4.0.11/RtError.h
  19. +1371
    -0
      source/backend/engine/rtaudio-4.0.11/config/config.guess
  20. +1362
    -0
      source/backend/engine/rtaudio-4.0.11/config/config.sub
  21. +0
    -0
      source/backend/engine/rtaudio-4.0.11/config/install.sh
  22. +6580
    -0
      source/backend/engine/rtaudio-4.0.11/configure
  23. +166
    -0
      source/backend/engine/rtaudio-4.0.11/configure.ac
  24. +70
    -0
      source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/PyRtAudioTest.py
  25. +57
    -0
      source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/readme
  26. +605
    -0
      source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/rtaudiomodule.cpp
  27. +58
    -0
      source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/setup.py
  28. +1572
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/Doxyfile
  29. +28
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/acknowledge.txt
  30. +39
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/apinotes.txt
  31. +84
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/compiling.txt
  32. +76
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/duplex.txt
  33. +5
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/error.txt
  34. +8
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/footer.html
  35. +10
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/header.html
  36. +30
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/license.txt
  37. +7
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/multi.txt
  38. +82
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/playback.txt
  39. +70
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/probe.txt
  40. +68
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/recording.txt
  41. +48
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/settings.txt
  42. +54
    -0
      source/backend/engine/rtaudio-4.0.11/doc/doxygen/tutorial.txt
  43. +641
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/RtAudio_8h-source.html
  44. +148
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/RtAudio_8h.html
  45. +677
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/RtAudio_8h_source.html
  46. +65
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/RtError_8h-source.html
  47. +65
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/RtError_8h_source.html
  48. +62
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/acknowledge.html
  49. +28
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/annotated.html
  50. +45
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/apinotes.html
  51. +57
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/bugs.html
  52. +51
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/classRtAudio-members.html
  53. +534
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/classRtAudio.html
  54. +40
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/classRtError-members.html
  55. +127
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/classRtError.html
  56. +27
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/classes.html
  57. +50
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/compiling.html
  58. +532
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/doxygen.css
  59. BIN
      source/backend/engine/rtaudio-4.0.11/doc/html/doxygen.png
  60. +90
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/duplex.html
  61. +24
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/errors.html
  62. +25
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/files.html
  63. +306
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/functions.html
  64. +38
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/functions_enum.html
  65. +90
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/functions_eval.html
  66. +107
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/functions_func.html
  67. +80
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/functions_vars.html
  68. +41
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/globals.html
  69. +25
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/globals_enum.html
  70. +33
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/globals_eval.html
  71. +41
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/globals_type.html
  72. +77
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/index.html
  73. +29
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/license.html
  74. +25
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/multi.html
  75. +45
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/pages.html
  76. +96
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/playback.html
  77. +74
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/probe.html
  78. +82
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/recording.html
  79. +57
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/settings.html
  80. +29
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioDeviceInfo-members.html
  81. +259
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioDeviceInfo.html
  82. +23
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioStreamParameters-members.html
  83. +109
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioStreamParameters.html
  84. +31
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1DeviceInfo-members.html
  85. +174
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1DeviceInfo.html
  86. +26
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamOptions-members.html
  87. +114
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamOptions.html
  88. +25
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamParameters-members.html
  89. +84
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamParameters.html
  90. BIN
      source/backend/engine/rtaudio-4.0.11/doc/html/tab_b.gif
  91. BIN
      source/backend/engine/rtaudio-4.0.11/doc/html/tab_l.gif
  92. BIN
      source/backend/engine/rtaudio-4.0.11/doc/html/tab_r.gif
  93. +105
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/tabs.css
  94. +88
    -0
      source/backend/engine/rtaudio-4.0.11/doc/html/updates.html
  95. BIN
      source/backend/engine/rtaudio-4.0.11/doc/images/ccrma.gif
  96. BIN
      source/backend/engine/rtaudio-4.0.11/doc/images/mcgill.gif
  97. +145
    -0
      source/backend/engine/rtaudio-4.0.11/doc/release.txt
  98. +257
    -0
      source/backend/engine/rtaudio-4.0.11/include/asio.cpp
  99. +1054
    -0
      source/backend/engine/rtaudio-4.0.11/include/asio.h
  100. +186
    -0
      source/backend/engine/rtaudio-4.0.11/include/asiodrivers.cpp

+ 1
- 0
source/Makefile.mk View File

@@ -55,6 +55,7 @@ BUILD_CXX_FLAGS += -DVESTIGE_HEADER
# --------------------------------------------------------------

ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST
HAVE_SUIL = $(shell pkg-config --exists suil-0 && echo true)
endif



+ 27
- 17
source/backend/carla_backend.hpp View File

@@ -89,7 +89,7 @@ const unsigned int PARAMETER_USES_CUSTOM_TEXT = 0x80; //!< Parameter uses custom
* The type defines how the \param value in CustomData is stored.
*
* Types are valid URIs.\n
* Any non-string, non-simple type is saved in a base64 encoded format.
* Any non-string, non-simple type (not integral) is saved in a base64 encoded format.
*/
const char* const CUSTOM_DATA_INVALID = nullptr; //!< Null/Invalid data.
const char* const CUSTOM_DATA_CHUNK = "http://kxstudio.sf.net/ns/carla/chunk"; //!< Carla Chunk
@@ -105,11 +105,11 @@ const char* const CUSTOM_DATA_STRING = "http://kxstudio.sf.net/ns/carla/string"
* TODO: Review these, may not be needed anymore
* @{
*/
const char* const CARLA_BRIDGE_MSG_HIDE_GUI = "CarlaBridgeHideGUI"; //!< Plugin -> Host call, tells host GUI is now hidden
const char* const CARLA_BRIDGE_MSG_SAVED = "CarlaBridgeSaved"; //!< Plugin -> Host call, tells host state is saved
const char* const CARLA_BRIDGE_MSG_SAVE_NOW = "CarlaBridgeSaveNow"; //!< Host -> Plugin call, tells plugin to save state now
const char* const CARLA_BRIDGE_MSG_SET_CHUNK = "CarlaBridgeSetChunk"; //!< Host -> Plugin call, tells plugin to set chunk in file \a value
const char* const CARLA_BRIDGE_MSG_SET_CUSTOM = "CarlaBridgeSetCustom"; //!< Host -> Plugin call, tells plugin to set a custom data set using \a value ("type·key·rvalue").\n If \a type is 'chunk' or 'binary' \a rvalue refers to chunk file.
//const char* const CARLA_BRIDGE_MSG_HIDE_GUI = "CarlaBridgeHideGUI"; //!< Plugin -> Host call, tells host GUI is now hidden
//const char* const CARLA_BRIDGE_MSG_SAVED = "CarlaBridgeSaved"; //!< Plugin -> Host call, tells host state is saved
//const char* const CARLA_BRIDGE_MSG_SAVE_NOW = "CarlaBridgeSaveNow"; //!< Host -> Plugin call, tells plugin to save state now
//const char* const CARLA_BRIDGE_MSG_SET_CHUNK = "CarlaBridgeSetChunk"; //!< Host -> Plugin call, tells plugin to set chunk in file \a value
//const char* const CARLA_BRIDGE_MSG_SET_CUSTOM = "CarlaBridgeSetCustom"; //!< Host -> Plugin call, tells plugin to set a custom data set using \a value ("type·key·rvalue").\n If \a type is 'chunk' or 'binary' \a rvalue refers to chunk file.
/**@}*/

/*!
@@ -130,14 +130,18 @@ enum BinaryType {
*/
enum PluginType {
PLUGIN_NONE = 0, //!< Null plugin type.
#ifndef BUILD_BRIDGE
PLUGIN_INTERNAL = 1, //!< Internal plugin.\see NativePlugin
#endif
PLUGIN_LADSPA = 2, //!< LADSPA plugin.\see LadspaPlugin
PLUGIN_DSSI = 3, //!< DSSI plugin.\see DssiPlugin
PLUGIN_LV2 = 4, //!< LV2 plugin.\see Lv2Plugin
PLUGIN_VST = 5, //!< VST plugin.\see VstPlugin
#ifndef BUILD_BRIDGE
PLUGIN_GIG = 6, //!< GIG sound kit, implemented via LinuxSampler.\see LinuxSamplerPlugin
PLUGIN_SF2 = 7, //!< SF2 sound kit (aka SoundFont), implemented via FluidSynth.\see FluidSynthPlugin
PLUGIN_SFZ = 8 //!< SFZ sound kit, implemented via LinuxSampler.\see LinuxSamplerPlugin
#endif
};

/*!
@@ -190,16 +194,16 @@ enum InternalParametersIndex {
*
* TODO: these need to be handled all internally, only via showGui() backend-side
*/
enum GuiType {
GUI_NONE = 0, //!< Null type, plugin has no custom GUI.
GUI_INTERNAL_QT4 = 1, //!< Qt4 type, handled internally.
GUI_INTERNAL_COCOA = 2, //!< Reparented MacOS native type, handled internally.
GUI_INTERNAL_HWND = 3, //!< Reparented Windows native type, handled internally.
GUI_INTERNAL_X11 = 4, //!< Reparented X11 native type, handled internally.
GUI_EXTERNAL_LV2 = 5, //!< External LV2-UI type, handled internally.
GUI_EXTERNAL_SUIL = 6, //!< SUIL type, currently used only for lv2 gtk2 direct-access UIs.\note This type will be removed in the future!
GUI_EXTERNAL_OSC = 7 //!< External, osc-bridge controlled, UI.
};
//enum GuiType {
// GUI_NONE = 0, //!< Null type, plugin has no custom GUI.
// GUI_INTERNAL_QT4 = 1, //!< Qt4 type, handled internally.
// GUI_INTERNAL_COCOA = 2, //!< Reparented MacOS native type, handled internally.
// GUI_INTERNAL_HWND = 3, //!< Reparented Windows native type, handled internally.
// GUI_INTERNAL_X11 = 4, //!< Reparented X11 native type, handled internally.
// GUI_EXTERNAL_LV2 = 5, //!< External LV2-UI type, handled internally.
// GUI_EXTERNAL_SUIL = 6, //!< SUIL type, currently used only for lv2 gtk2 direct-access UIs.\note This type will be removed in the future!
// GUI_EXTERNAL_OSC = 7 //!< External, osc-bridge controlled, UI.
//};

/*!
* Options used in the set_option() call.\n
@@ -249,11 +253,13 @@ enum OptionsType {
*/
OPTION_FORCE_STEREO = 6,

#ifdef WANT_DSSI
/*!
* Use (unofficial) dssi-vst chunks feature.\n
* Default is no.
*/
OPTION_USE_DSSI_VST_CHUNKS = 7,
#endif

/*!
* Use plugin bridges whenever possible.\n
@@ -304,6 +310,7 @@ enum OptionsType {
*/
OPTION_PATH_BRIDGE_WIN64 = 15,

#ifdef WANT_LV2
/*!
* Set path to the LV2 Gtk2 UI bridge executable.\n
* Default unset.
@@ -345,7 +352,9 @@ enum OptionsType {
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_X11 = 22,
#endif

#ifdef WANT_VST
/*!
* Set path to the VST Cocoa UI bridge executable.\n
* Default unset.
@@ -363,6 +372,7 @@ enum OptionsType {
* Default unset.
*/
OPTION_PATH_BRIDGE_VST_X11 = 25
#endif
};

/*!
@@ -508,7 +518,7 @@ enum CallbackType {
};

/*!
* Engine process mode, changed using set_option().
* Engine process mode.
*
* \see OPTION_PROCESS_MODE
*/


+ 123
- 134
source/backend/carla_engine.hpp View File

@@ -18,10 +18,9 @@
#ifndef __CARLA_ENGINE_HPP__
#define __CARLA_ENGINE_HPP__

//#include "carla_engine_osc.hpp"
//#include "carla_engine_thread.hpp"
#include "carla_backend.hpp"
#include "carla_utils.hpp"

//#include <QtCore/QProcessEnvironment>
class QProcessEnvironment;

CARLA_BACKEND_START_NAMESPACE
@@ -33,15 +32,6 @@ CARLA_BACKEND_START_NAMESPACE
* @{
*/

/*!
* @defgroup TimeInfoValidHints TimeInfo Valid Hints
*
* Various hints used for CarlaTimeInfo::valid.
* @{
*/
const uint32_t CarlaEngineTimeBBT = 0x1;
/**@}*/

/*!
* The type of an engine.
*/
@@ -52,13 +42,13 @@ enum CarlaEngineType {
CarlaEngineTypeNull = 0,

/*!
* Jack engine type.\n
* JACK engine type.\n
* Provides single, multi-client, and rack processing modes.
*/
CarlaEngineTypeJack = 1,

/*!
* RtAudio engine type, used to provide ALSA, PulseAudio, DirectSound, ASIO and CoreAudio/Midi support.\n
* RtAudio engine type, used to provide Native Audio and Midi support.\n
* Provides rack mode processing only.
*/
CarlaEngineTypeRtAudio = 2,
@@ -137,10 +127,10 @@ enum CarlaEngineControlEventType {
*/
struct CarlaEngineControlEvent {
CarlaEngineControlEventType type;
uint32_t time;
uint8_t channel;
uint16_t parameter;
double value;
uint32_t time; //!< frame offset
uint8_t channel; //!< channel, used for MIDI-related events and ports
uint16_t parameter; //!< parameter, used for parameter changes only
double value; //!< value

CarlaEngineControlEvent()
: type(CarlaEngineNullEvent),
@@ -168,30 +158,34 @@ struct CarlaEngineMidiEvent {
* Engine BBT Time information.
*/
struct CarlaEngineTimeInfoBBT {
int32_t bar;
int32_t beat;
int32_t tick;
double bar_start_tick;
float beats_per_bar;
float beat_type;
double ticks_per_beat;
double beats_per_minute;
int32_t bar; //!< current bar
int32_t beat; //!< current beat-within-bar
int32_t tick; //!< current tick-within-beat
double barStartTick;

float beatsPerBar; //!< time signature "numerator"
float beatType; //!< time signature "denominator"

double ticksPerBeat;
double beatsPerMinute;

CarlaEngineTimeInfoBBT()
: bar(0),
beat(0),
tick(0),
bar_start_tick(0.0),
beats_per_bar(0.0f),
beat_type(0.0f),
ticks_per_beat(0.0),
beats_per_minute(0.0) {}
barStartTick(0.0),
beatsPerBar(0.0f),
beatType(0.0f),
ticksPerBeat(0.0),
beatsPerMinute(0.0) {}
};

/*!
* Engine Time information.
*/
struct CarlaEngineTimeInfo {
static const uint32_t ValidBBT = 0x1;

bool playing;
uint32_t frame;
uint32_t time;
@@ -212,21 +206,24 @@ struct CarlaEngineOptions {
ProcessMode processMode;
bool processHighPrecision;

uint maxParameters;
uint preferredBufferSize;
uint preferredSampleRate;

bool forceStereo;
bool useDssiVstChunks;

bool preferPluginBridges;
bool preferUiBridges;
#ifdef WANT_DSSI
bool useDssiVstChunks;
#endif

uint maxParameters;
uint oscUiTimeout;
uint preferredBufferSize;
uint preferredSampleRate;

CarlaString bridge_native;
CarlaString bridge_posix32;
CarlaString bridge_posix64;
CarlaString bridge_win32;
CarlaString bridge_win64;
#ifdef WANT_LV2
CarlaString bridge_lv2gtk2;
CarlaString bridge_lv2gtk3;
CarlaString bridge_lv2qt4;
@@ -234,43 +231,48 @@ struct CarlaEngineOptions {
CarlaString bridge_lv2cocoa;
CarlaString bridge_lv2win;
CarlaString bridge_lv2x11;
#endif
#ifdef WANT_VST
CarlaString bridge_vstcocoa;
CarlaString bridge_vsthwnd;
CarlaString bridge_vstx11;
#endif

CarlaEngineOptions()
: processMode(PROCESS_MODE_CONTINUOUS_RACK),
: processMode(PROCESS_MODE_PATCHBAY),
processHighPrecision(false),
maxParameters(MAX_PARAMETERS),
preferredBufferSize(512),
preferredSampleRate(44100),
forceStereo(false),
useDssiVstChunks(false),
preferPluginBridges(false),
preferUiBridges(true),
oscUiTimeout(4000/100) {}
#ifdef WANT_DSSI
useDssiVstChunks(false),
#endif
maxParameters(MAX_PARAMETERS),
oscUiTimeout(4000/100),
preferredBufferSize(512),
preferredSampleRate(44100) {}
};

// -----------------------------------------------------------------------

/*!
* Engine port (Base).\n
* This is the base class for all Carla engine ports.
* Engine port (Abstract).\n
* This is the base class for all Carla Engine ports.
*/
class CarlaEngineBasePort
class CarlaEnginePort
{
public:
/*!
* The contructor.\n
* Param \a isInput defines wherever this is an input port or not (output otherwise).\n
* Input/output state is constant for the lifetime of the port.
* Input/output state and process mode is constant for the lifetime of the port.
*/
CarlaEngineBasePort(const bool isInput, const ProcessMode processMode);
CarlaEnginePort(const bool isInput, const ProcessMode processMode);

/*!
* The decontructor.
*/
virtual ~CarlaEngineBasePort();
virtual ~CarlaEnginePort();

/*!
* Get the type of the port, as provided by the respective subclasses.
@@ -291,15 +293,14 @@ protected:
// -----------------------------------------------------------------------

/*!
* Engine port (Audio).
* Engine Audio port.
*/
class CarlaEngineAudioPort : public CarlaEngineBasePort
class CarlaEngineAudioPort : public CarlaEnginePort
{
public:
/*!
* The contructor.\n
* Param \a isInput defines wherever this is an input port or not (output otherwise).\n
* Input/output state is constant for the lifetime of the port.
* All constructor parameters are constant and will never change in the lifetime of the port.
*/
CarlaEngineAudioPort(const bool isInput, const ProcessMode processMode);

@@ -325,15 +326,14 @@ public:
// -----------------------------------------------------------------------

/*!
* Engine port (Control).
* Engine Control port.
*/
class CarlaEngineControlPort : public CarlaEngineBasePort
class CarlaEngineControlPort : public CarlaEnginePort
{
public:
/*!
* The contructor.\n
* Param \a isInput defines wherever this is an input port or not (output otherwise).\n
* Input/output state is constant for the lifetime of the port.
* All constructor parameters are constant and will never change in the lifetime of the port.
*/
CarlaEngineControlPort(const bool isInput, const ProcessMode processMode);

@@ -373,20 +373,22 @@ public:
** \note You must only call this for output ports.
*/
virtual void writeEvent(const CarlaEngineControlEventType type, const uint32_t time, const uint8_t channel, const uint16_t parameter, const double value);

private:
const uint32_t m_maxEventCount;
};

// -----------------------------------------------------------------------

/*!
* Engine port (MIDI).
* Engine MIDI port.
*/
class CarlaEngineMidiPort : public CarlaEngineBasePort
class CarlaEngineMidiPort : public CarlaEnginePort
{
public:
/*!
* The contructor.\n
* Param \a isInput defines wherever this is an input port or not (output otherwise).\n
* Input/output state is constant for the lifetime of the port.
* All constructor parameters are constant and will never change in the lifetime of the port.
*/
CarlaEngineMidiPort(const bool isInput, const ProcessMode processMode);

@@ -426,39 +428,43 @@ public:
** \note You must only call this for output ports.
*/
virtual void writeEvent(const uint32_t time, const uint8_t* const data, const uint8_t size);

private:
const uint32_t m_maxEventCount;
};

// -----------------------------------------------------------------------

/*!
* Engine client.\n
* Engine client (Abstract).\n
* Each plugin requires one client from the engine (created via CarlaEngine::addPort()).\n
* \note This is a virtual class, each engine type provides its own funtionality.
*/
class CarlaEngineClient
{
public:
protected:
/*!
* The contructor.\n
* The constructor, protected.\n
* All constructor parameters are constant and will never change in the lifetime of the client.\n
* Client starts in deactivated state.
*/
CarlaEngineClient(const CarlaEngineType engineType, const ProcessMode processMode);

public:
/*!
* The decontructor.
* The destructor.
*/
virtual ~CarlaEngineClient();

/*!
* Activate this client.\n
* \note Client must be deactivated before calling this function.
* Client must be deactivated before calling this function.
*/
virtual void activate();

/*!
* Deactivate this client.\n
* \note Client must be activated before calling this function.
* Client must be activated before calling this function.
*/
virtual void deactivate();

@@ -486,9 +492,9 @@ public:

/*!
* Add a new port of type \a portType.
* \note This function does nothing in rack processing mode since its ports are static (2 audio, 1 midi and 1 control for both input and output).
* \note This function does nothing in rack processing mode since ports are static there (2 audio, 1 control and 1 midi for both input and output).
*/
virtual const CarlaEngineBasePort* addPort(const CarlaEnginePortType portType, const char* const name, const bool isInput) = 0;
virtual const CarlaEnginePort* addPort(const CarlaEnginePortType portType, const char* const name, const bool isInput) = 0;

protected:
const CarlaEngineType engineType;
@@ -501,7 +507,7 @@ private:

// -----------------------------------------------------------------------

class CarlaEnginePrivateData;
struct CarlaEnginePrivateData;

/*!
* Carla Engine.
@@ -509,6 +515,13 @@ class CarlaEnginePrivateData;
*/
class CarlaEngine
{
protected:
/*!
* The constructor, protected.\n
* \note This only initializes engine data, it doesn't initialize the engine itself.
*/
CarlaEngine();

public:
/*!
* The decontructor.
@@ -519,12 +532,6 @@ public:
// -------------------------------------------------------------------
// Static values and calls

/*!
* Maximum number of peaks per plugin.\n
* \note There are both input and output peaks.
*/
static const unsigned short MAX_PEAKS = 2;

/*!
* Get the number of available engine drivers.
*/
@@ -629,7 +636,10 @@ public:
* Add new plugin, using native binary type.\n
* Returns the id of the plugin, or -1 if the operation failed.
*/
short addPlugin(const PluginType ptype, const char* const filename, const char* const name, const char* const label, void* const extra = nullptr);
short addPlugin(const PluginType ptype, const char* const filename, const char* const name, const char* const label, void* const extra = nullptr)
{
return addPlugin(BINARY_NATIVE, ptype, filename, name, label, extra);
}

/*!
* Remove plugin with id \a id.
@@ -737,9 +747,6 @@ public:
* Get the engine options as process environment.
*/
const QProcessEnvironment& getOptionsAsProcessEnvironment() const;
//{
// return m_procEnv;
//}

/*!
* Set the engine option \a option.
@@ -869,20 +876,9 @@ public:
void osc_send_control_exit();
#endif

#ifndef BUILD_BRIDGE
// -------------------------------------------------------------------
// Rack mode

static const unsigned short MAX_CONTROL_EVENTS = 512;
static const unsigned short MAX_MIDI_EVENTS = 512;
CarlaEngineControlEvent rackControlEventsIn[MAX_CONTROL_EVENTS];
CarlaEngineControlEvent rackControlEventsOut[MAX_CONTROL_EVENTS];
CarlaEngineMidiEvent rackMidiEventsIn[MAX_MIDI_EVENTS];
CarlaEngineMidiEvent rackMidiEventsOut[MAX_MIDI_EVENTS];
#endif

// -------------------------------------

#if 0
/*!
* \class ScopedLocker
*
@@ -908,7 +904,7 @@ public:
// mutex->lock();
//}

~ScopedLocker()
~ScopedLocker() {}
//{
// if (m_lock)
// mutex->unlock();
@@ -918,32 +914,50 @@ public:
QMutex* const mutex;
const bool m_lock;
};
#endif

// -------------------------------------

protected:
/*!
* The contructor, protected.\n
* \note This only initializes engine data, it doesn't initialize the engine itself.
*/
CarlaEngine();
CarlaString name;
uint32_t bufferSize;
double sampleRate;

CarlaEngineOptions options;
CarlaEngineTimeInfo timeInfo;

#ifndef BUILD_BRIDGE
// Rack mode data
static const unsigned short MAX_CONTROL_EVENTS = 512;
static const unsigned short MAX_MIDI_EVENTS = 512;
CarlaEngineControlEvent rackControlEventsIn[MAX_CONTROL_EVENTS];
CarlaEngineControlEvent rackControlEventsOut[MAX_CONTROL_EVENTS];
CarlaEngineMidiEvent rackMidiEventsIn[MAX_MIDI_EVENTS];
CarlaEngineMidiEvent rackMidiEventsOut[MAX_MIDI_EVENTS];

/*!
* Proccess audio buffer in rack mode, protected.
* Proccess audio buffer in rack mode.
*/
void processRack(float* inBuf[2], float* outBuf[2], const uint32_t frames);
#endif

CarlaEngineOptions options;

CarlaString name;
uint32_t bufferSize;
double sampleRate;
CarlaEngineTimeInfo timeInfo;
/*!
* Proccess audio buffer in patchbay mode.
* In \a bufCount, [0]=inBufCount and [1]=outBufCount
*/
void processPatchbay(float** inBuf, float** outBuf, const uint32_t bufCount[2], const uint32_t frames);
#endif

/*!
* Report to all plugins about buffer size change.
*/
void bufferSizeChanged(const uint32_t newBufferSize);

/*!
* Report to all plugins about sample rate change.
* This is not supported on all plugin types, on which case they will be re-initiated.
*/
void sampleRateChanged(const double newSampleRate);

private:
#ifdef CARLA_ENGINE_JACK
static CarlaEngine* newJack();
@@ -962,38 +976,13 @@ private:

static CarlaEngine* newRtAudio(RtAudioApi api);
static unsigned int getRtAudioApiCount();
static const char* getRtAudioApiName(unsigned int index);
static const char* getRtAudioApiName(unsigned int index);
#endif

CarlaEnginePrivateData* const data;
friend class CarlaEngineInternal;
#if 0
private:
CarlaEngineOsc m_osc;
CarlaEngineThread m_thread;

const CarlaOscData* m_oscData;

CallbackFunc m_callback;
void* m_callbackPtr;
CarlaString m_lastError;

#ifndef BUILD_BRIDGE
QProcessEnvironment m_procEnv;
#endif

QMutex m_procLock;
QMutex m_midiLock;

CarlaPlugin* m_carlaPlugins[MAX_PLUGINS];
const char* m_uniqueNames[MAX_PLUGINS];

double m_insPeak[MAX_PLUGINS * MAX_PEAKS];
double m_outsPeak[MAX_PLUGINS * MAX_PEAKS];

bool m_aboutToClose;
unsigned short m_maxPluginNumber;
#endif
friend class CarlaEngineControlPort;
friend class CarlaEngineMidiPort;
};

// -----------------------------------------------------------------------


+ 24
- 20
source/backend/carla_plugin.hpp View File

@@ -20,12 +20,16 @@

//#include "carla_midi.h"
//#include "carla_engine.hpp"
//#include "carla_osc_utils.hpp"
//#include "carla_plugin_thread.hpp"

//#ifdef BUILD_BRIDGE
//# include "carla_bridge_osc.hpp"
//#endif
# include "carla_backend.hpp"

#ifdef BUILD_BRIDGE
# include "carla_bridge_osc.hpp"
#else
# include "carla_osc_utils.hpp"
#endif

// common includes
//#include <cmath>
@@ -457,7 +461,7 @@ public:
/*!
* Get information about the plugin's custom GUI, if provided.
*/
virtual void getGuiInfo(GuiType* const type, bool* const resizable);
//virtual void getGuiInfo(GuiType* const type, bool* const resizable);

// -------------------------------------------------------------------
// Set data (internal stuff)
@@ -636,7 +640,7 @@ public:
*
* \note This function must be always called from the main thread.
*/
virtual void setGuiContainer(GuiContainer* const container);
//virtual void setGuiContainer(GuiContainer* const container);

/*!
* Show (or hide) the plugin's custom GUI according to \a yesNo.
@@ -827,26 +831,26 @@ public:
// -------------------------------------------------------------------
// Plugin initializers

struct initializer {
struct Initializer {
CarlaEngine* const engine;
const char* const filename;
const char* const name;
const char* const label;
};

//#ifndef BUILD_BRIDGE
static CarlaPlugin* newNative(const initializer& init);
//#endif
static CarlaPlugin* newLADSPA(const initializer& init, const void* const extra);
static CarlaPlugin* newDSSI(const initializer& init, const void* const extra);
static CarlaPlugin* newLV2(const initializer& init);
static CarlaPlugin* newVST(const initializer& init);
//#ifndef BUILD_BRIDGE
static CarlaPlugin* newGIG(const initializer& init);
static CarlaPlugin* newSF2(const initializer& init);
static CarlaPlugin* newSFZ(const initializer& init);
static CarlaPlugin* newBridge(const initializer& init, const BinaryType btype, const PluginType ptype, const void* const extra);
//#endif
#ifndef BUILD_BRIDGE
static CarlaPlugin* newNative(const Initializer& init);
#endif
static CarlaPlugin* newLADSPA(const Initializer& init, const void* const extra);
static CarlaPlugin* newDSSI(const Initializer& init, const void* const extra);
static CarlaPlugin* newLV2(const Initializer& init);
static CarlaPlugin* newVST(const Initializer& init);
#ifndef BUILD_BRIDGE
static CarlaPlugin* newGIG(const Initializer& init);
static CarlaPlugin* newSF2(const Initializer& init);
static CarlaPlugin* newSFZ(const Initializer& init);
static CarlaPlugin* newBridge(const Initializer& init, const BinaryType btype, const PluginType ptype, const void* const extra);
#endif

static size_t getNativePluginCount();
static const PluginDescriptor* getNativePluginDescriptor(const size_t index);


+ 76
- 0
source/backend/engine/Makefile View File

@@ -0,0 +1,76 @@
#!/usr/bin/make -f
# Makefile for carla-engine #
# ------------------------------------ #
# Created by falkTX
#

include ../../Makefile.mk

# --------------------------------------------------------------

BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC
BUILD_CXX_FLAGS += -I. -I.. -I../../includes -I../../libs -I../../utils
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore)

LINK_FLAGS += -shared
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore)

ifeq ($(HAVE_JACK),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags jack) -D__UNIX_JACK__
LINK_FLAGS += $(shell pkg-config --libs jack)
WANT_JACK = true
endif

ifeq ($(HAVE_ALSA),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags alsa) -D__LINUX_ALSA__ -D__LINUX_ALSASEQ__
LINK_FLAGS += $(shell pkg-config --libs alsa)
WANT_RTAUDIO = true
endif

ifeq ($(HAVE_PULSEAUDIO),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags libpulse-simple) -D__LINUX_PULSE__
LINK_FLAGS += $(shell pkg-config --libs libpulse-simple)
WANT_RTAUDIO = true
endif

OBJS = \
carla_engine.cpp.o \
carla_engine_osc.cpp.o \
carla_engine_thread.cpp.o \
jack.cpp.o \
rtaudio.cpp.o

TARGET = ../carla_engine.so

# --------------------------------------------------------------

ifeq ($(WANT_JACK),true)
BUILD_CXX_FLAGS += -DCARLA_ENGINE_JACK
endif

ifeq ($(WANT_RTAUDIO),true)
BUILD_CXX_FLAGS += -DCARLA_ENGINE_RTAUDIO -DHAVE_GETTIMEOFDAY
BUILD_CXX_FLAGS += -Irtaudio-4.0.11 -Irtmidi-2.0.1
ifeq ($(DEBUG),true)
BUILD_CXX_FLAGS += -D__RTAUDIO_DEBUG__ -D__RTMIDI_DEBUG__
else
BUILD_CXX_FLAGS += -D_FORTIFY_SOURCE=2
endif
OBJS += rtaudio-4.0.11/RtAudio.cpp.o
OBJS += rtmidi-2.0.1/RtMidi.cpp.o
endif

# --------------------------------------------------------------

all: $(TARGET)

clean:
rm -f $(OBJS) $(TARGET)

# --------------------------------------------------------------

%.cpp.o: %.cpp
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

$(TARGET): $(OBJS)
$(CXX) $^ $(LINK_FLAGS) -o $@

+ 2002
- 0
source/backend/engine/carla_engine.cpp
File diff suppressed because it is too large
View File


+ 74
- 0
source/backend/engine/carla_engine.pro View File

@@ -0,0 +1,74 @@
# QtCreator project file

QT = core

CONFIG = debug
CONFIG += link_pkgconfig qt shared warn_on

DEFINES = DEBUG
DEFINES += QTCREATOR_TEST

# JACK
DEFINES += CARLA_ENGINE_JACK

# RtAudio/RtMidi
DEFINES += CARLA_ENGINE_RTAUDIO HAVE_GETTIMEOFDAY
DEFINES += __LINUX_ALSA__ __LINUX_ALSASEQ__ __LINUX_PULSE__ __UNIX_JACK__
DEFINES += __RTAUDIO_DEBUG__ __RTMIDI_DEBUG__

# DISTRHO Plugin
# DEFINES += CARLA_ENGINE_PLUGIN
# DEFINES += DISTRHO_PLUGIN_TARGET_STANDALONE

# Misc
DEFINES += WANT_LADSPA WANT_DSSI WANT_LV2 WANT_VST

PKGCONFIG = liblo jack alsa libpulse-simple

TARGET = carla_engine
TEMPLATE = lib
VERSION = 0.5.0

SOURCES = \
carla_engine.cpp \
carla_engine_osc.cpp \
carla_engine_thread.cpp \
jack.cpp \
plugin.cpp \
rtaudio.cpp

HEADERS = \
carla_engine_internal.hpp \
carla_engine_osc.hpp \
carla_engine_thread.hpp

HEADERS += \
../carla_backend.hpp \
../carla_engine.hpp \
../carla_plugin.hpp

HEADERS += \
../../utils/carla_utils.hpp \
../../utils/carla_backend_utils.hpp

# HEADERS += \
# plugin/DistrhoPluginInfo.h

INCLUDEPATH = . .. \
../../includes \
../../libs \
../../utils

# FIXME
INCLUDEPATH += \
/opt/kxstudio/include

# RtAudio/RtMidi
INCLUDEPATH += rtaudio-4.0.11 rtmidi-2.0.1
SOURCES += rtaudio-4.0.11/RtAudio.cpp
SOURCES += rtmidi-2.0.1/RtMidi.cpp

# Plugin
# INCLUDEPATH += ../distrho-plugin-toolkit

QMAKE_CXXFLAGS *= -std=c++0x

+ 159
- 0
source/backend/engine/carla_engine_internal.hpp View File

@@ -0,0 +1,159 @@
/*
* Carla Engine
* Copyright (C) 2013 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the COPYING file
*/

#ifndef __CARLA_ENGINE_INTERNAL_HPP__
#define __CARLA_ENGINE_INTERNAL_HPP__

#include "carla_engine.hpp"
#include "carla_engine_osc.hpp"
#include "carla_engine_thread.hpp"

#include "carla_plugin.hpp"

#ifndef BUILD_BRIDGE
# include <QtCore/QProcessEnvironment>
#endif

#ifdef CARLA_ENGINE_RTAUDIO
# if defined(Q_OS_MAC) && ! defined(__MACOSX_CORE__)
# define __MACOSX_CORE__
# endif
# if defined(Q_OS_WIN) && ! (defined(__WINDOWS_ASIO__) || defined(__WINDOWS_DS__))
# define __WINDOWS_ASIO__
# define __WINDOWS_DS__
# endif
#endif

CARLA_BACKEND_START_NAMESPACE

// -------------------------------------------------------------------------------------------------------------------

static inline
const char* CarlaEngineType2Str(const CarlaEngineType type)
{
switch (type)
{
case CarlaEngineTypeNull:
return "CarlaEngineTypeNull";
case CarlaEngineTypeJack:
return "CarlaEngineTypeJack";
case CarlaEngineTypeRtAudio:
return "CarlaEngineTypeRtAudio";
case CarlaEngineTypePlugin:
return "CarlaEngineTypePlugin";
}

qWarning("CarlaBackend::CarlaEngineType2Str(%i) - invalid type", type);
return nullptr;
}

static inline
const char* CarlaEnginePortType2Str(const CarlaEnginePortType type)
{
switch (type)
{
case CarlaEnginePortTypeNull:
return "CarlaEnginePortTypeNull";
case CarlaEnginePortTypeAudio:
return "CarlaEnginePortTypeAudio";
case CarlaEnginePortTypeControl:
return "CarlaEnginePortTypeControl";
case CarlaEnginePortTypeMIDI:
return "CarlaEnginePortTypeMIDI";
}

qWarning("CarlaBackend::CarlaEnginePortType2Str(%i) - invalid type", type);
return nullptr;
}

static inline
const char* CarlaEngineControlEventType2Str(const CarlaEngineControlEventType type)
{
switch (type)
{
case CarlaEngineNullEvent:
return "CarlaEngineNullEvent";
case CarlaEngineParameterChangeEvent:
return "CarlaEngineParameterChangeEvent";
case CarlaEngineMidiBankChangeEvent:
return "CarlaEngineMidiBankChangeEvent";
case CarlaEngineMidiProgramChangeEvent:
return "CarlaEngineMidiProgramChangeEvent";
case CarlaEngineAllSoundOffEvent:
return "CarlaEngineAllSoundOffEvent";
case CarlaEngineAllNotesOffEvent:
return "CarlaEngineAllNotesOffEvent";
}

qWarning("CarlaBackend::CarlaEngineControlEventType2Str(%i) - invalid type", type);
return nullptr;
}

// -------------------------------------------------------------------------------------------------------------------

/*!
* Maximum number of peaks per plugin.\n
* \note There are both input and output peaks.
*/
/*static*/ const unsigned short MAX_PEAKS = 2;

const uint32_t PATCHBAY_BUFFER_SIZE = 128;
const unsigned short PATCHBAY_EVENT_COUNT = 256;

struct CarlaEnginePrivateData {
CarlaEngineOsc osc;
CarlaEngineThread thread;

const CarlaOscData* oscData;

CallbackFunc callback;
void* callbackPtr;
CarlaString lastError;

#ifndef BUILD_BRIDGE
QProcessEnvironment procEnv;
#endif

QMutex procLock;
QMutex midiLock;

CarlaPlugin* carlaPlugins[MAX_PLUGINS];
const char* uniqueNames[MAX_PLUGINS];

double insPeak[MAX_PLUGINS * MAX_PEAKS];
double outsPeak[MAX_PLUGINS * MAX_PEAKS];

bool aboutToClose;
unsigned short maxPluginNumber;

CarlaEnginePrivateData(CarlaEngine* const engine)
: osc(engine),
thread(engine),
oscData(nullptr),
callback(nullptr),
callbackPtr(nullptr),
carlaPlugins{nullptr},
uniqueNames{nullptr},
insPeak{0.0},
outsPeak{0.0},
aboutToClose(false),
maxPluginNumber(0) {}
};

CARLA_BACKEND_END_NAMESPACE

#endif // __CARLA_ENGINE_INTERNAL_HPP__

+ 687
- 0
source/backend/engine/carla_engine_osc.cpp View File

@@ -0,0 +1,687 @@
/*
* Carla Engine OSC
* Copyright (C) 2011-2012 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the COPYING file
*/

#include "carla_engine.hpp"
#include "carla_engine_osc.hpp"
#include "carla_plugin.hpp"
#include "carla_midi.h"

#include <QtCore/QString>

CARLA_BACKEND_START_NAMESPACE

// -----------------------------------------------------------------------

CarlaEngineOsc::CarlaEngineOsc(CarlaEngine* const engine_)
: engine(engine_)
{
qDebug("CarlaEngineOsc::CarlaEngineOsc(%p)", engine);
CARLA_ASSERT(engine);

m_name = nullptr;
m_nameSize = 0;

m_serverTCP = nullptr;
m_serverUDP = nullptr;
}

CarlaEngineOsc::~CarlaEngineOsc()
{
qDebug("CarlaEngineOsc::~CarlaEngineOsc()");
CARLA_ASSERT(! m_name);
CARLA_ASSERT(! m_serverTCP);
CARLA_ASSERT(! m_serverUDP);
}

// -----------------------------------------------------------------------

void CarlaEngineOsc::init(const char* const name)
{
qDebug("CarlaEngineOsc::init(\"%s\")", name);
CARLA_ASSERT(! m_name);
CARLA_ASSERT(! m_serverTCP);
CARLA_ASSERT(! m_serverUDP);
CARLA_ASSERT(m_nameSize == 0);
CARLA_ASSERT(m_serverPathTCP.isEmpty());
CARLA_ASSERT(m_serverPathUDP.isEmpty());
CARLA_ASSERT(name);

m_name = strdup(name ? name : "");
m_nameSize = strlen(m_name);

m_serverTCP = lo_server_new_with_proto(nullptr, LO_TCP, osc_error_handlerTCP);
m_serverUDP = lo_server_new_with_proto(nullptr, LO_UDP, osc_error_handlerUDP);

if (m_serverTCP)
{
if (char* const serverPathTCP = lo_server_get_url(m_serverTCP))
{
m_serverPathTCP = serverPathTCP;
m_serverPathTCP += m_name;
free(serverPathTCP);
}

lo_server_add_method(m_serverTCP, nullptr, nullptr, osc_message_handler, this);
}

if (m_serverUDP)
{
if (char* const serverPathUDP = lo_server_get_url(m_serverUDP))
{
m_serverPathUDP = serverPathUDP;
m_serverPathUDP += m_name;
free(serverPathUDP);
}

lo_server_add_method(m_serverUDP, nullptr, nullptr, osc_message_handler, this);
}
}

void CarlaEngineOsc::idle()
{
if (m_serverTCP)
{
while (lo_server_recv_noblock(m_serverTCP, 0) != 0) {}
}

if (m_serverUDP)
{
while (lo_server_recv_noblock(m_serverUDP, 0) != 0) {}
}
}

void CarlaEngineOsc::close()
{
qDebug("CarlaEngineOsc::close()");
CARLA_ASSERT(m_name);
CARLA_ASSERT(m_serverTCP);
CARLA_ASSERT(m_serverUDP);
CARLA_ASSERT(m_serverPathTCP.isNotEmpty());
CARLA_ASSERT(m_serverPathUDP.isNotEmpty());

m_nameSize = 0;

if (m_name)
{
free(m_name);
m_name = nullptr;
}

if (m_serverTCP)
{
lo_server_del_method(m_serverTCP, nullptr, nullptr);
lo_server_free(m_serverTCP);
m_serverTCP = nullptr;
}

if (m_serverUDP)
{
lo_server_del_method(m_serverUDP, nullptr, nullptr);
lo_server_free(m_serverUDP);
m_serverUDP = nullptr;
}

m_serverPathTCP.clear();
m_serverPathUDP.clear();

#ifndef BUILD_BRIDGE
m_controlData.free();
#endif
}

// -----------------------------------------------------------------------

int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg)
{
#if DEBUG
if (! QString(path).endsWith("peak"))
qDebug("CarlaEngineOsc::handleMessage(%s, %i, %p, %s, %p)", path, argc, argv, types, msg);
#endif
CARLA_ASSERT(m_name);
CARLA_ASSERT(m_serverTCP || m_serverUDP);
CARLA_ASSERT(m_serverPathTCP.isNotEmpty() || m_serverPathUDP.isNotEmpty());
CARLA_ASSERT(path);

if (! path)
{
qCritical("CarlaEngineOsc::handleMessage() - got invalid path");
return 1;
}

if (! m_name)
{
qCritical("CarlaEngineOsc::handleMessage(\"%s\", ...) - received message but client is offline", path);
return 1;
}

#ifndef BUILD_BRIDGE
// Initial path check
if (strcmp(path, "/register") == 0)
{
const lo_address source = lo_message_get_source(msg);
return handleMsgRegister(argc, argv, types, source);
}
if (strcmp(path, "/unregister") == 0)
{
return handleMsgUnregister();
}
#endif

// Check if message is for this client
if (strlen(path) <= m_nameSize || strncmp(path+1, m_name, m_nameSize) != 0)
{
qWarning("CarlaEngineOsc::handleMessage() - message not for this client -> '%s' != '/%s/'", path, m_name);
return 1;
}

// Get plugin id from message
int pluginId = 0;

if (std::isdigit(path[m_nameSize+2]))
pluginId += path[m_nameSize+2]-'0';

if (std::isdigit(path[m_nameSize+3]))
pluginId += (path[m_nameSize+3]-'0')*10;

if (pluginId < 0 || pluginId > engine->maxPluginNumber())
{
qCritical("CarlaEngineOsc::handleMessage() - failed to get plugin, wrong id '%i'", pluginId);
return 1;
}

// Get plugin
CarlaPlugin* const plugin = engine->getPluginUnchecked(pluginId);

if (plugin == nullptr || plugin->id() != pluginId)
{
qWarning("CarlaEngineOsc::handleMessage() - invalid plugin id '%i', probably has been removed", pluginId);
return 1;
}

// Get method from path, "/Carla/i/method"
const int offset = (pluginId >= 10) ? 5 : 4;
char method[32] = { 0 };
strncpy(method, path + (m_nameSize + offset), 31);

if (method[0] == '\0')
{
qWarning("CarlaEngineOsc::handleMessage(\"%s\", ...) - received message without method", path);
return 1;
}

// Common OSC methods (DSSI and internal UIs)
if (strcmp(method, "update") == 0)
{
const lo_address source = lo_message_get_source(msg);
return handleMsgUpdate(plugin, argc, argv, types, source);
}
if (strcmp(method, "configure") == 0)
return handleMsgConfigure(plugin, argc, argv, types);
if (strcmp(method, "control") == 0)
return handleMsgControl(plugin, argc, argv, types);
if (strcmp(method, "program") == 0)
return handleMsgProgram(plugin, argc, argv, types);
if (strcmp(method, "midi") == 0)
return handleMsgMidi(plugin, argc, argv, types);
if (strcmp(method, "exiting") == 0)
return handleMsgExiting(plugin);

#ifndef BUILD_BRIDGE
// Internal methods
if (strcmp(method, "set_active") == 0)
return handleMsgSetActive(plugin, argc, argv, types);
if (strcmp(method, "set_drywet") == 0)
return handleMsgSetDryWet(plugin, argc, argv, types);
if (strcmp(method, "set_volume") == 0)
return handleMsgSetVolume(plugin, argc, argv, types);
if (strcmp(method, "set_balance_left") == 0)
return handleMsgSetBalanceLeft(plugin, argc, argv, types);
if (strcmp(method, "set_balance_right") == 0)
return handleMsgSetBalanceRight(plugin, argc, argv, types);
if (strcmp(method, "set_parameter_value") == 0)
return handleMsgSetParameterValue(plugin, argc, argv, types);
if (strcmp(method, "set_parameter_midi_cc") == 0)
return handleMsgSetParameterMidiCC(plugin, argc, argv, types);
if (strcmp(method, "set_parameter_midi_channel") == 0)
return handleMsgSetParameterMidiChannel(plugin, argc, argv, types);
if (strcmp(method, "set_program") == 0)
return handleMsgSetProgram(plugin, argc, argv, types);
if (strcmp(method, "set_midi_program") == 0)
return handleMsgSetMidiProgram(plugin, argc, argv, types);
if (strcmp(method, "note_on") == 0)
return handleMsgNoteOn(plugin, argc, argv, types);
if (strcmp(method, "note_off") == 0)
return handleMsgNoteOff(plugin, argc, argv, types);

// Plugin Bridges
if ((plugin->hints() & PLUGIN_IS_BRIDGE) > 0 && strlen(method) > 11 && strncmp(method, "bridge_", 7) == 0)
{
if (strcmp(method+7, "set_inpeak") == 0)
return handleMsgBridgeSetInPeak(plugin, argc, argv, types);
if (strcmp(method+7, "set_outpeak") == 0)
return handleMsgBridgeSetOutPeak(plugin, argc, argv, types);
if (strcmp(method+7, "audio_count") == 0)
return plugin->setOscBridgeInfo(PluginBridgeAudioCount, argc, argv, types);
if (strcmp(method+7, "midi_count") == 0)
return plugin->setOscBridgeInfo(PluginBridgeMidiCount, argc, argv, types);
if (strcmp(method+7, "parameter_count") == 0)
return plugin->setOscBridgeInfo(PluginBridgeParameterCount, argc, argv, types);
if (strcmp(method+7, "program_count") == 0)
return plugin->setOscBridgeInfo(PluginBridgeProgramCount, argc, argv, types);
if (strcmp(method+7, "midi_program_count") == 0)
return plugin->setOscBridgeInfo(PluginBridgeMidiProgramCount, argc, argv, types);
if (strcmp(method+7, "plugin_info") == 0)
return plugin->setOscBridgeInfo(PluginBridgePluginInfo, argc, argv, types);
if (strcmp(method+7, "parameter_info") == 0)
return plugin->setOscBridgeInfo(PluginBridgeParameterInfo, argc, argv, types);
if (strcmp(method+7, "parameter_data") == 0)
return plugin->setOscBridgeInfo(PluginBridgeParameterData, argc, argv, types);
if (strcmp(method+7, "parameter_ranges") == 0)
return plugin->setOscBridgeInfo(PluginBridgeParameterRanges, argc, argv, types);
if (strcmp(method+7, "program_info") == 0)
return plugin->setOscBridgeInfo(PluginBridgeProgramInfo, argc, argv, types);
if (strcmp(method+7, "midi_program_info") == 0)
return plugin->setOscBridgeInfo(PluginBridgeMidiProgramInfo, argc, argv, types);
if (strcmp(method+7, "configure") == 0)
return plugin->setOscBridgeInfo(PluginBridgeConfigure, argc, argv, types);
if (strcmp(method+7, "set_parameter_value") == 0)
return plugin->setOscBridgeInfo(PluginBridgeSetParameterValue, argc, argv, types);
if (strcmp(method+7, "set_default_value") == 0)
return plugin->setOscBridgeInfo(PluginBridgeSetDefaultValue, argc, argv, types);
if (strcmp(method+7, "set_program") == 0)
return plugin->setOscBridgeInfo(PluginBridgeSetProgram, argc, argv, types);
if (strcmp(method+7, "set_midi_program") == 0)
return plugin->setOscBridgeInfo(PluginBridgeSetMidiProgram, argc, argv, types);
if (strcmp(method+7, "set_custom_data") == 0)
return plugin->setOscBridgeInfo(PluginBridgeSetCustomData, argc, argv, types);
if (strcmp(method+7, "set_chunk_data") == 0)
return plugin->setOscBridgeInfo(PluginBridgeSetChunkData, argc, argv, types);
if (strcmp(method+7, "update") == 0)
return plugin->setOscBridgeInfo(PluginBridgeUpdateNow, argc, argv, types);
if (strcmp(method+7, "error") == 0)
return plugin->setOscBridgeInfo(PluginBridgeError, argc, argv, types);
}
#endif

// Plugin-specific methods
#ifdef WANT_LV2
if (strcmp(method, "lv2_atom_transfer") == 0)
return handleMsgLv2AtomTransfer(plugin, argc, argv, types);
if (strcmp(method, "lv2_event_transfer") == 0)
return handleMsgLv2EventTransfer(plugin, argc, argv, types);
#endif

qWarning("CarlaEngineOsc::handleMessage() - unsupported OSC method '%s'", method);
return 1;
}

// -----------------------------------------------------------------------

#ifndef BUILD_BRIDGE
int CarlaEngineOsc::handleMsgRegister(const int argc, const lo_arg* const* const argv, const char* const types, const lo_address source)
{
qDebug("CarlaEngineOsc::handleMsgRegister()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "s");

if (m_controlData.path)
{
qWarning("CarlaEngineOsc::handleMsgRegister() - OSC backend already registered to %s", m_controlData.path);
return 1;
}

const char* const url = (const char*)&argv[0]->s;
const char* host;
const char* port;

qDebug("CarlaEngineOsc::handleMsgRegister() - OSC backend registered to %s", url);

host = lo_address_get_hostname(source);
port = lo_address_get_port(source);
m_controlData.source = lo_address_new_with_proto(LO_TCP, host, port);

host = lo_url_get_hostname(url);
port = lo_url_get_port(url);
m_controlData.path = lo_url_get_path(url);
m_controlData.target = lo_address_new_with_proto(LO_TCP, host, port);

free((void*)host);
free((void*)port);

for (unsigned short i=0; i < engine->maxPluginNumber(); i++)
{
CarlaPlugin* const plugin = engine->getPluginUnchecked(i);

if (plugin && plugin->enabled())
plugin->registerToOscClient();
}

return 0;
}

int CarlaEngineOsc::handleMsgUnregister()
{
qDebug("CarlaEngineOsc::handleMsgUnregister()");

if (! m_controlData.path)
{
qWarning("CarlaEngineOsc::handleMsgUnregister() - OSC backend is not registered yet");
return 1;
}

m_controlData.free();
return 0;
}
#endif

// -----------------------------------------------------------------------

int CarlaEngineOsc::handleMsgUpdate(CARLA_ENGINE_OSC_HANDLE_ARGS2, const lo_address source)
{
qDebug("CarlaEngineOsc::handleMsgUpdate()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "s");

const char* const url = (const char*)&argv[0]->s;
plugin->updateOscData(source, url);

return 0;
}

int CarlaEngineOsc::handleMsgConfigure(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgConfigure()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ss");

const char* const key = (const char*)&argv[0]->s;
const char* const value = (const char*)&argv[1]->s;

#ifdef DEBUG
qDebug("CarlaEngineOsc::handleMsgConfigure(\"%s\", \"%s\")", key, value);
#endif

plugin->setCustomData(CUSTOM_DATA_STRING, key, value, false);

return 0;
}

int CarlaEngineOsc::handleMsgControl(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgControl()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "if");

const int rindex = argv[0]->i;
const float value = argv[1]->f;
plugin->setParameterValueByRIndex(rindex, value, false, true, true);

return 0;
}

int CarlaEngineOsc::handleMsgProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgProgram()");

if (argc == 2)
{
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii");

const uint32_t bank_id = argv[0]->i;
const uint32_t program_id = argv[1]->i;
plugin->setMidiProgramById(bank_id, program_id, false, true, true, true);

return 0;
}
else
{
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i");

const uint32_t program_id = argv[0]->i;

if (program_id < plugin->programCount())
{
plugin->setProgram(program_id, false, true, true, true);
return 0;
}

qCritical("CarlaEngineOsc::handleMsgProgram() - program_id '%i' out of bounds", program_id);
}

return 1;
}

int CarlaEngineOsc::handleMsgMidi(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgMidi()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "m");

if (plugin->midiInCount() > 0)
{
const uint8_t* const data = argv[0]->m;
uint8_t status = data[1];
uint8_t channel = status & 0x0F;

// Fix bad note-off
if (MIDI_IS_STATUS_NOTE_ON(status) && data[3] == 0)
status -= 0x10;

if (MIDI_IS_STATUS_NOTE_OFF(status))
{
uint8_t note = data[2];
plugin->sendMidiSingleNote(channel, note, 0, false, true, true);
}
else if (MIDI_IS_STATUS_NOTE_ON(status))
{
uint8_t note = data[2];
uint8_t velo = data[3];
plugin->sendMidiSingleNote(channel, note, velo, false, true, true);
}

return 0;
}

qWarning("CarlaEngineOsc::handleMsgMidi() - recived midi when plugin has no midi inputs");
return 1;
}

int CarlaEngineOsc::handleMsgExiting(CARLA_ENGINE_OSC_HANDLE_ARGS1)
{
qDebug("CarlaEngineOsc::handleMsgExiting()");

// TODO - check for non-UIs (dssi-vst) and set to -1 instead
engine->callback(CALLBACK_SHOW_GUI, plugin->id(), 0, 0, 0.0, nullptr);
plugin->freeOscData();

return 0;
}

// -----------------------------------------------------------------------

#ifndef BUILD_BRIDGE
int CarlaEngineOsc::handleMsgSetActive(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetActive()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i");

const bool active = (bool)argv[0]->i;
plugin->setActive(active, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetDryWet(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetDryWet()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f");

const float value = argv[0]->f;
plugin->setDryWet(value, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetVolume(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetVolume()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f");

const float value = argv[0]->f;
plugin->setVolume(value, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetBalanceLeft(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetBalanceLeft()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f");

const float value = argv[0]->f;
plugin->setBalanceLeft(value, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetBalanceRight(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetBalanceRight()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f");

const float value = argv[0]->f;
plugin->setBalanceRight(value, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetParameterValue(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetParameterValue()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "if");

const int32_t index = argv[0]->i;
const float value = argv[1]->f;
plugin->setParameterValue(index, value, true, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetParameterMidiCC(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetParameterMidiCC()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii");

const int32_t index = argv[0]->i;
const int32_t cc = argv[1]->i;
plugin->setParameterMidiCC(index, cc, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetParameterMidiChannel(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetParameterMidiChannel()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii");

const int32_t index = argv[0]->i;
const int32_t channel = argv[1]->i;
plugin->setParameterMidiChannel(index, channel, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgSetProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetProgram()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i");

const int32_t index = argv[0]->i;
plugin->setProgram(index, true, false, true, true);

// parameters might have changed, send all param values back
if (m_controlData.target && index >= 0)
{
for (uint32_t i=0; i < plugin->parameterCount(); i++)
engine->osc_send_control_set_parameter_value(plugin->id(), i, plugin->getParameterValue(i));
}

return 0;
}

int CarlaEngineOsc::handleMsgSetMidiProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgSetMidiProgram()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i");

const int32_t index = argv[0]->i;
plugin->setMidiProgram(index, true, false, true, true);

// parameters might have changed, send all param values back
if (m_controlData.target && index >= 0)
{
for (uint32_t i=0; i < plugin->parameterCount(); i++)
engine->osc_send_control_set_parameter_value(plugin->id(), i, plugin->getParameterValue(i));
}

return 0;
}

int CarlaEngineOsc::handleMsgNoteOn(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgNoteOn()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(3, "iii");

const int32_t channel = argv[0]->i;
const int32_t note = argv[1]->i;
const int32_t velo = argv[2]->i;
plugin->sendMidiSingleNote(channel, note, velo, true, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgNoteOff(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
qDebug("CarlaEngineOsc::handleMsgNoteOff()");
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii");

const int32_t channel = argv[0]->i;
const int32_t note = argv[1]->i;
plugin->sendMidiSingleNote(channel, note, 0, true, false, true);

return 0;
}

int CarlaEngineOsc::handleMsgBridgeSetInPeak(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "id");

const int32_t index = argv[0]->i;
const double value = argv[1]->d;
engine->setInputPeak(plugin->id(), index-1, value);

return 0;
}

int CarlaEngineOsc::handleMsgBridgeSetOutPeak(CARLA_ENGINE_OSC_HANDLE_ARGS2)
{
CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "id");

const int32_t index = argv[0]->i;
const double value = argv[1]->d;
engine->setOutputPeak(plugin->id(), index-1, value);

return 0;
}
#endif

CARLA_BACKEND_END_NAMESPACE

+ 169
- 0
source/backend/engine/carla_engine_osc.hpp View File

@@ -0,0 +1,169 @@
/*
* Carla Engine OSC
* Copyright (C) 2012 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the COPYING file
*/

#ifndef CARLA_ENGINE_OSC_HPP
#define CARLA_ENGINE_OSC_HPP

#include "carla_backend.hpp"
#include "carla_osc_utils.hpp"

#define CARLA_ENGINE_OSC_HANDLE_ARGS1 CarlaPlugin* const plugin
#define CARLA_ENGINE_OSC_HANDLE_ARGS2 CarlaPlugin* const plugin, const int argc, const lo_arg* const* const argv, const char* const types

#define CARLA_ENGINE_OSC_CHECK_OSC_TYPES(/* argc, types, */ argcToCompare, typesToCompare) \
/* check argument count */ \
if (argc != argcToCompare) \
{ \
qCritical("CarlaEngineOsc::%s() - argument count mismatch: %i != %i", __FUNCTION__, argc, argcToCompare); \
return 1; \
} \
if (argc > 0) \
{ \
/* check for nullness */ \
if (! (types && typesToCompare)) \
{ \
qCritical("CarlaEngineOsc::%s() - argument types are null", __FUNCTION__); \
return 1; \
} \
/* check argument types */ \
if (strcmp(types, typesToCompare) != 0) \
{ \
qCritical("CarlaEngineOsc::%s() - argument types mismatch: '%s' != '%s'", __FUNCTION__, types, typesToCompare); \
return 1; \
} \
}

CARLA_BACKEND_START_NAMESPACE

#if 0
} // Fix editor indentation
#endif

class CarlaEngineOsc
{
public:
CarlaEngineOsc(CarlaEngine* const engine);
~CarlaEngineOsc();

void init(const char* const name);
void idle();
void close();

// -------------------------------------------------------------------

#ifndef BUILD_BRIDGE
bool isControlRegistered() const
{
return bool(m_controlData.target);
}

const CarlaOscData* getControlData() const
{
return &m_controlData;
}
#endif

const char* getServerPathTCP() const
{
return (const char*)m_serverPathTCP;
}

const char* getServerPathUDP() const
{
return (const char*)m_serverPathUDP;
}

// -------------------------------------------------------------------

private:
CarlaEngine* const engine;

char* m_name;
size_t m_nameSize;

lo_server m_serverTCP;
lo_server m_serverUDP;
CarlaString m_serverPathTCP;
CarlaString m_serverPathUDP;

#ifndef BUILD_BRIDGE
CarlaOscData m_controlData; // for carla-control
#endif

// -------------------------------------------------------------------

int handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg);

#ifndef BUILD_BRIDGE
int handleMsgRegister(const int argc, const lo_arg* const* const argv, const char* const types, const lo_address source);
int handleMsgUnregister();
#endif

int handleMsgUpdate(CARLA_ENGINE_OSC_HANDLE_ARGS2, const lo_address source);
int handleMsgConfigure(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgControl(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgMidi(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgExiting(CARLA_ENGINE_OSC_HANDLE_ARGS1);

#ifndef BUILD_BRIDGE
int handleMsgSetActive(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetDryWet(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetVolume(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetBalanceLeft(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetBalanceRight(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetParameterValue(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetParameterMidiCC(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetParameterMidiChannel(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgSetMidiProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgNoteOn(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgNoteOff(CARLA_ENGINE_OSC_HANDLE_ARGS2);

int handleMsgBridgeSetInPeak(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgBridgeSetOutPeak(CARLA_ENGINE_OSC_HANDLE_ARGS2);
#endif

#ifdef WANT_LV2
int handleMsgLv2AtomTransfer(CARLA_ENGINE_OSC_HANDLE_ARGS2);
int handleMsgLv2EventTransfer(CARLA_ENGINE_OSC_HANDLE_ARGS2);
#endif

// -----------------------------------------------------------------------

static void osc_error_handlerTCP(const int num, const char* const msg, const char* const path)
{
qWarning("CarlaEngineOsc::osc_error_handlerTCP(%i, \"%s\", \"%s\")", num, msg, path);
}

static void osc_error_handlerUDP(const int num, const char* const msg, const char* const path)
{
qWarning("CarlaEngineOsc::osc_error_handlerUDP(%i, \"%s\", \"%s\")", num, msg, path);
}

static int osc_message_handler(const char* const path, const char* const types, lo_arg** const argv, const int argc, const lo_message msg, void* const userData)
{
CARLA_ASSERT(userData);
if (CarlaEngineOsc* const _this_ = (CarlaEngineOsc*)userData)
return _this_->handleMessage(path, argc, argv, types, msg);
return 1;
}
};

CARLA_BACKEND_END_NAMESPACE

#endif // CARLA_ENGINE_OSC_HPP

+ 158
- 0
source/backend/engine/carla_engine_thread.cpp View File

@@ -0,0 +1,158 @@
/*
* Carla Engine Thread
* Copyright (C) 2012 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the COPYING file
*/

#include "carla_engine.hpp"
#include "carla_engine_thread.hpp"
#include "carla_plugin.hpp"

CARLA_BACKEND_START_NAMESPACE

// -----------------------------------------------------------------------

CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine_, QObject* const parent)
: QThread(parent),
engine(engine_)
{
qDebug("CarlaEngineThread::CarlaEngineThread(%p, %p)", engine, parent);
CARLA_ASSERT(engine);

m_stopNow = true;
}

CarlaEngineThread::~CarlaEngineThread()
{
qDebug("CarlaEngineThread::~CarlaEngineThread()");
CARLA_ASSERT(m_stopNow);
}

// -----------------------------------------------------------------------

void CarlaEngineThread::startNow()
{
qDebug("CarlaEngineThread::startNow()");
CARLA_ASSERT(m_stopNow);

m_stopNow = false;

start(QThread::HighPriority);
}

void CarlaEngineThread::stopNow()
{
qDebug("CarlaEngineThread::stopNow()");

if (m_stopNow)
return;

m_stopNow = true;

const ScopedLocker m(this);

if (isRunning() && ! wait(200))
{
quit();

if (isRunning() && ! wait(300))
terminate();
}
}

// -----------------------------------------------------------------------

void CarlaEngineThread::run()
{
qDebug("CarlaEngineThread::run()");
CARLA_ASSERT(engine->isRunning());

bool oscRegisted, usesSingleThread;
unsigned short i;
double value;

while (engine->isRunning() && ! m_stopNow)
{
const ScopedLocker m(this);
#ifndef BUILD_BRIDGE
oscRegisted = engine->isOscControlRegistered();
#else
oscRegisted = engine->isOscBridgeRegistered();
#endif

for (i=0; i < engine->maxPluginNumber(); i++)
{
CarlaPlugin* const plugin = engine->getPluginUnchecked(i);

if (! (plugin && plugin->enabled()))
continue;

#ifndef BUILD_BRIDGE
const unsigned short id = plugin->id();
#endif
usesSingleThread = (plugin->hints() & PLUGIN_USES_SINGLE_THREAD);

// -------------------------------------------------------
// Process postponed events

if (! usesSingleThread)
plugin->postEventsRun();

if (oscRegisted || ! usesSingleThread)
{
// ---------------------------------------------------
// Update parameter outputs

for (uint32_t j=0; j < plugin->parameterCount(); j++)
{
if (! plugin->parameterIsOutput(j))
continue;

value = plugin->getParameterValue(j);

// Update UI
if (! usesSingleThread)
plugin->uiParameterChange(j, value);

// Update OSC engine client
if (oscRegisted)
{
#ifdef BUILD_BRIDGE
engine->osc_send_bridge_set_parameter_value(j, value);
#else
engine->osc_send_control_set_parameter_value(id, j, value);
#endif
}
}

// ---------------------------------------------------
// Update OSC control client peaks

if (oscRegisted)
{
#ifdef BUILD_BRIDGE
engine->osc_send_peaks(plugin);
#else
engine->osc_send_peaks(plugin, id);
#endif
}
}
}

engine->idleOsc();
msleep(oscRegisted ? 40 : 50);
}
}

CARLA_BACKEND_END_NAMESPACE

+ 77
- 0
source/backend/engine/carla_engine_thread.hpp View File

@@ -0,0 +1,77 @@
/*
* Carla Engine Thread
* Copyright (C) 2012 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the COPYING file
*/

#ifndef CARLA_ENGINE_THREAD_HPP
#define CARLA_ENGINE_THREAD_HPP

#include "carla_backend.hpp"

#include <QtCore/QMutex>
#include <QtCore/QThread>

CARLA_BACKEND_START_NAMESPACE

#if 0
} // Fix editor indentation
#endif

class CarlaEngineThread : public QThread
{
public:
CarlaEngineThread(CarlaEngine* const engine, QObject* const parent = nullptr);
~CarlaEngineThread();

void startNow();
void stopNow();

// ----------------------------------------------

protected:
void run();

// ----------------------------------------------

private:
CarlaEngine* const engine;

QMutex m_mutex;
bool m_stopNow;

// ----------------------------------------------

class ScopedLocker
{
public:
ScopedLocker(CarlaEngineThread* const thread)
: mutex(&thread->m_mutex)
{
mutex->lock();
}

~ScopedLocker()
{
mutex->unlock();
}

private:
QMutex* const mutex;
};
};

CARLA_BACKEND_END_NAMESPACE

#endif // CARLA_ENGINE_THREAD_HPP

+ 1156
- 0
source/backend/engine/jack.cpp
File diff suppressed because it is too large
View File


+ 539
- 0
source/backend/engine/plugin.cpp View File

@@ -0,0 +1,539 @@
/*
* Carla Plugin Engine
* Copyright (C) 2012 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the COPYING file
*/

#ifdef CARLA_ENGINE_PLUGIN

#include "carla_engine.hpp"
#include "carla_plugin.hpp"

#include "DistrhoPlugin.h"

CARLA_BACKEND_START_NAMESPACE

// -----------------------------------------
// Parameters

static const unsigned char paramMap[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
0x50, 0x51, 0x52, 0x53, 0x54, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F
};

static const unsigned int paramVolume = 5;
static const unsigned int paramBalance = 6;
static const unsigned int paramPan = 8;

static const unsigned int paramCount = sizeof(paramMap);
static const unsigned int programCount = 128;

// -------------------------------------------------------------------------------------------------------------------
// Plugin Engine client

class CarlaEnginePluginClient : public CarlaEngineClient
{
public:
CarlaEnginePluginClient(const CarlaEngineType engineType, const ProcessMode processMode)
: CarlaEngineClient(engineType, processMode)
{
}

~CarlaEnginePluginClient()
{
}

const CarlaEngineBasePort* addPort(const CarlaEnginePortType portType, const char* const name, const bool isInput)
{
qDebug("CarlaEnginePluginClient::addPort(%i, \"%s\", %s)", portType, name, bool2str(isInput));

switch (portType)
{
case CarlaEnginePortTypeNull:
break;
case CarlaEnginePortTypeAudio:
return new CarlaEngineAudioPort(isInput, processMode);
case CarlaEnginePortTypeControl:
return new CarlaEngineControlPort(isInput, processMode);
case CarlaEnginePortTypeMIDI:
return new CarlaEngineMidiPort(isInput, processMode);
}

qCritical("CarlaEnginePluginClient::addPort(%i, \"%s\", %s) - invalid type", portType, name, bool2str(isInput));
return nullptr;
}
};

// -----------------------------------------

class CarlaEnginePlugin : public CarlaEngine,
public DISTRHO::Plugin
{
public:
short idZyn;

CarlaEnginePlugin()
: CarlaEngine(),
DISTRHO::Plugin(paramCount, programCount, 0)
{
qDebug("CarlaEnginePlugin::CarlaEnginePlugin()");

// init parameters
for (unsigned int i=0; i < paramCount; i++)
paramBuffers[i] = 0.0f;

paramBuffers[paramVolume] = 100.0f;
paramBuffers[paramBalance] = 63.5f;
paramBuffers[paramPan] = 63.5f;

memcpy(prevParamBuffers, paramBuffers, sizeof(float)*paramCount);

// set-up engine
options.processMode = PROCESS_MODE_CONTINUOUS_RACK;
options.forceStereo = true;
options.preferPluginBridges = false;
options.preferUiBridges = false;
init("Carla");

// Force thread start so we get some OSC usage
// (liblo locks otherwise)
//startCheckThread();

// testing
idZyn = addPlugin(PLUGIN_DSSI, "/usr/lib/dssi/sineshaper.so", nullptr, "ll-sineshaper");
}

~CarlaEnginePlugin()
{
qDebug("CarlaEnginePlugin::~CarlaEnginePlugin()");

removeAllPlugins();
close();
}

// -------------------------------------
// CarlaEngine virtual calls

bool init(const char* const clientName)
{
qDebug("CarlaEnginePlugin::init(\"%s\")", clientName);

bufferSize = d_bufferSize();
sampleRate = d_sampleRate();

name = clientName;
name.toBasic();

CarlaEngine::init(name);
return true;
}

bool close()
{
qDebug("CarlaEnginePlugin::close()");
CarlaEngine::close();

return true;
}

bool isRunning() const
{
return true;
}

bool isOffline() const
{
return false;
}

CarlaEngineType type() const
{
return CarlaEngineTypeRtAudio;
}

CarlaEngineClient* addClient(CarlaPlugin* const)
{
return new CarlaEnginePluginClient(CarlaEngineTypeRtAudio, options.processMode);
}

protected:
// ---------------------------------------------
// DISTRHO Plugin Information

const char* d_label()
{
return "Carla";
}

const char* d_maker()
{
return "falkTX";
}

const char* d_license()
{
return "GPL v2+";
}

uint32_t d_version()
{
return 0x0500;
}

long d_uniqueId()
{
return d_cconst('C', 'r', 'l', 'a');
}

// ---------------------------------------------
// DISTRHO Plugin Init

void d_initParameter(uint32_t index, DISTRHO::Parameter& parameter)
{
if (index >= paramCount)
return;

parameter.hints = DISTRHO::PARAMETER_IS_AUTOMABLE;
parameter.ranges.def = 0.0f;
parameter.ranges.min = 0.0f;
parameter.ranges.max = 127.0f;

if (index == paramVolume)
parameter.ranges.def = 100.0f;
else if (index == paramBalance)
parameter.ranges.def = 63.5f;
else if (index == paramPan)
parameter.ranges.def = 63.5f;

switch (paramMap[index])
{
case 0x01:
parameter.name = "0x01 Modulation";
break;
case 0x02:
parameter.name = "0x02 Breath";
break;
case 0x03:
parameter.name = "0x03 (Undefined)";
break;
case 0x04:
parameter.name = "0x04 Foot";
break;
case 0x05:
parameter.name = "0x05 Portamento";
break;
case 0x07:
parameter.name = "0x07 Volume";
break;
case 0x08:
parameter.name = "0x08 Balance";
break;
case 0x09:
parameter.name = "0x09 (Undefined)";
break;
case 0x0A:
parameter.name = "0x0A Pan";
break;
case 0x0B:
parameter.name = "0x0B Expression";
break;
case 0x0C:
parameter.name = "0x0C FX Control 1";
break;
case 0x0D:
parameter.name = "0x0D FX Control 2";
break;
case 0x0E:
parameter.name = "0x0E (Undefined)";
break;
case 0x0F:
parameter.name = "0x0F (Undefined)";
break;
case 0x10:
parameter.name = "0x10 General Purpose 1";
break;
case 0x11:
parameter.name = "0x11 General Purpose 2";
break;
case 0x12:
parameter.name = "0x12 General Purpose 3";
break;
case 0x13:
parameter.name = "0x13 General Purpose 4";
break;
case 0x14:
parameter.name = "0x14 (Undefined)";
break;
case 0x15:
parameter.name = "0x15 (Undefined)";
break;
case 0x16:
parameter.name = "0x16 (Undefined)";
break;
case 0x17:
parameter.name = "0x17 (Undefined)";
break;
case 0x18:
parameter.name = "0x18 (Undefined)";
break;
case 0x19:
parameter.name = "0x19 (Undefined)";
break;
case 0x1A:
parameter.name = "0x1A (Undefined)";
break;
case 0x1B:
parameter.name = "0x1B (Undefined)";
break;
case 0x1C:
parameter.name = "0x1C (Undefined)";
break;
case 0x1D:
parameter.name = "0x1D (Undefined)";
break;
case 0x1E:
parameter.name = "0x1E (Undefined)";
break;
case 0x1F:
parameter.name = "0x1F (Undefined)";
break;
case 0x46:
parameter.name = "0x46 Control 1 [Variation]";
break;
case 0x47:
parameter.name = "0x47 Control 2 [Timbre]";
break;
case 0x48:
parameter.name = "0x48 Control 3 [Release]";
break;
case 0x49:
parameter.name = "0x49 Control 4 [Attack]";
break;
case 0x4A:
parameter.name = "0x4A Control 5 [Brightness]";
break;
case 0x4B:
parameter.name = "0x4B Control 6 [Decay]";
break;
case 0x4C:
parameter.name = "0x4C Control 7 [Vib Rate]";
break;
case 0x4D:
parameter.name = "0x4D Control 8 [Vib Depth]";
break;
case 0x4E:
parameter.name = "0x4E Control 9 [Vib Delay]";
break;
case 0x4F:
parameter.name = "0x4F Control 10 [Undefined]";
break;
case 0x50:
parameter.name = "0x50 General Purpose 5";
break;
case 0x51:
parameter.name = "0x51 General Purpose 6";
break;
case 0x52:
parameter.name = "0x52 General Purpose 7";
break;
case 0x53:
parameter.name = "0x53 General Purpose 8";
break;
case 0x54:
parameter.name = "0x54 Portamento Control";
break;
case 0x5B:
parameter.name = "0x5B FX 1 Depth [Reverb]";
break;
case 0x5C:
parameter.name = "0x5C FX 2 Depth [Tremolo]";
break;
case 0x5D:
parameter.name = "0x5D FX 3 Depth [Chorus]";
break;
case 0x5E:
parameter.name = "0x5E FX 4 Depth [Detune]";
break;
case 0x5F:
parameter.name = "0x5F FX 5 Depth [Phaser]";
break;
}
}

void d_initProgramName(uint32_t index, d_string& programName)
{
programName = "Program #" + d_string(index);
}

void d_initStateKey(uint32_t index, d_string& stateKey)
{
Q_UNUSED(index);
Q_UNUSED(stateKey);
}

// ---------------------------------------------
// DISTRHO Plugin Internal data

float d_parameterValue(uint32_t index)
{
if (index >= paramCount)
return 0.0f;

return paramBuffers[index];
}

void d_setParameterValue(uint32_t index, float value)
{
if (index >= paramCount)
return;

paramBuffers[index] = value;
}

void d_setProgram(uint32_t index)
{
if (index >= programCount)
return;
if (maxPluginNumber() == 0)
return;

if (CarlaPlugin* const plugin = getPlugin(0))
{
if (index > plugin->programCount())
plugin->setProgram(index, true, true, false, true);
}
}

void d_setState(const char* key, const char* value)
{
Q_UNUSED(key);
Q_UNUSED(value);
}

// ---------------------------------------------
// DISTRHO Plugin Process

void d_activate()
{
//#if 0
for (unsigned short i=0, max=maxPluginNumber(); i < max; i++)
{
CarlaPlugin* const plugin = getPluginUnchecked(i);

if (plugin && plugin->enabled())
plugin->setActive(true, true, false);
}
//#endif

memcpy(prevParamBuffers, paramBuffers, sizeof(float)*paramCount);
}

void d_deactivate()
{
//#if 0
for (unsigned short i=0, max=maxPluginNumber(); i < max; i++)
{
CarlaPlugin* const plugin = getPluginUnchecked(i);

if (plugin && plugin->enabled())
plugin->setActive(false, true, false);
}
//#endif
}

void d_run(float** inputs, float** outputs, uint32_t frames, uint32_t midiEventCount, const DISTRHO::MidiEvent* midiEvents)
{
if (maxPluginNumber() == 0)
return;

// create audio buffers
float* inBuf[2] = { (float*)inputs[0], (float*)inputs[1] };
float* outBuf[2] = { outputs[0], outputs[1] };

// initialize control input
memset(rackControlEventsIn, 0, sizeof(CarlaEngineControlEvent)*CarlaEngine::MAX_CONTROL_EVENTS);
{
uint32_t carlaEventIndex = 0;

for (unsigned int i=0; i < paramCount; i++)
{
if (prevParamBuffers[i] == paramBuffers[i])
continue;

CarlaEngineControlEvent* const carlaEvent = &rackControlEventsIn[carlaEventIndex++];

carlaEvent->type = CarlaEngineParameterChangeEvent;
carlaEvent->parameter = paramMap[i];
carlaEvent->value = paramBuffers[i]/127;
}
}
memcpy(prevParamBuffers, paramBuffers, sizeof(float)*paramCount);

// initialize midi input
memset(rackMidiEventsIn, 0, sizeof(CarlaEngineMidiEvent)*CarlaEngine::MAX_MIDI_EVENTS);
{
const DISTRHO::MidiEvent* event;

for (uint32_t i=0, j=0; j < midiEventCount; j++)
{
if (i == CarlaEngine::MAX_MIDI_EVENTS)
break;

event = &midiEvents[j];

rackMidiEventsIn[i].time = event->frame;
rackMidiEventsIn[i].size = 3;
memcpy(rackMidiEventsIn[i].data, event->buffer, 3);
i += 1;
}
}

processRack(inBuf, outBuf, frames);
}

// ---------------------------------------------
// Callbacks

void d_bufferSizeChanged(uint32_t newBufferSize)
{
bufferSizeChanged(newBufferSize);
}

// ---------------------------------------------

private:
float paramBuffers[paramCount];
float prevParamBuffers[paramCount];
};

CARLA_BACKEND_END_NAMESPACE

// -------------------------------------------------

START_NAMESPACE_DISTRHO

Plugin* createPlugin()
{
return new CarlaBackend::CarlaEnginePlugin();
}

END_NAMESPACE_DISTRHO

// -------------------------------------------------

#include "DistrhoPluginMain.cpp"

#endif // CARLA_ENGINE_PLUGIN

+ 57
- 0
source/backend/engine/rtaudio-4.0.11/Makefile.in View File

@@ -0,0 +1,57 @@
### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in
### RtAudio library Makefile

RM = /bin/rm
LN = /bin/ln

OBJECTS = RtAudio.o @objects@

STATIC = librtaudio.a
SHARED = @sharedlib@
RELEASE = 4.0.11
MAJOR = 4
LIBRARIES = $(STATIC) $(SHARED)

CC = @CXX@
AR = @AR@
RANLIB = @RANLIB@

DEFS = @CPPFLAGS@
CFLAGS = @CXXFLAGS@ -Iinclude -fPIC

all : $(LIBRARIES)

tests:
cd tests && $(MAKE) all

$(LIBRARIES): $(OBJECTS)
$(AR) ruv $(STATIC) $(OBJECTS)
ranlib $(STATIC)
$(CC) -fPIC @libflags@ $(OBJECTS) @LIBS@
$(LN) -s @sharedname@ $(SHARED)

# $(CC) -shared $(OBJECTS) -o $(SHARED) @LIBS@

%.o : %.cpp
$(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@

%.o : include/%.cpp
$(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@

clean :
$(RM) -f $(LIBRARIES) @sharedname@ $(SHARED)*
$(RM) -f $(OBJECTS)
$(RM) -f *~
cd tests && $(MAKE) clean

distclean:
$(RM) -f $(LIBRARIES) @sharedname@ $(SHARED)*
$(RM) -f $(OBJECTS)
$(RM) -f *~
$(RM) -rf config.log config.status autom4te.cache Makefile rtaudio-config
cd tests && $(MAKE) distclean

strip :
strip $(LIBRARIES)
ranlib $(LIBRARIES)
cd tests && $(MAKE) strip

+ 8363
- 0
source/backend/engine/rtaudio-4.0.11/RtAudio.cpp
File diff suppressed because it is too large
View File


+ 1014
- 0
source/backend/engine/rtaudio-4.0.11/RtAudio.h
File diff suppressed because it is too large
View File


+ 60
- 0
source/backend/engine/rtaudio-4.0.11/RtError.h View File

@@ -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 <exception>
#include <iostream>
#include <string>

class RtError : public std::exception
{
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. */
MEMORY_ERROR, /*!< An error occured during memory allocation. */
INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */
INVALID_USE, /*!< The function was called incorrectly. */
DRIVER_ERROR, /*!< A system driver error occured. */
SYSTEM_ERROR, /*!< A system error occured. */
THREAD_ERROR /*!< A thread error occured. */
};

//! The constructor.
RtError( const std::string& message, Type type = RtError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
//! The destructor.
virtual ~RtError( void ) throw() {}

//! Prints thrown error message to stderr.
virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }

//! Returns the thrown error message type.
virtual const Type& getType(void) const throw() { return type_; }

//! Returns the thrown error message string.
virtual const std::string& getMessage(void) const throw() { return message_; }

//! Returns the thrown error message as a c-style string.
virtual const char* what( void ) const throw() { return message_.c_str(); }

protected:
std::string message_;
Type type_;
};

#endif

+ 1371
- 0
source/backend/engine/rtaudio-4.0.11/config/config.guess
File diff suppressed because it is too large
View File


+ 1362
- 0
source/backend/engine/rtaudio-4.0.11/config/config.sub
File diff suppressed because it is too large
View File


+ 0
- 0
source/backend/engine/rtaudio-4.0.11/config/install.sh View File


+ 6580
- 0
source/backend/engine/rtaudio-4.0.11/configure
File diff suppressed because it is too large
View File


+ 166
- 0
source/backend/engine/rtaudio-4.0.11/configure.ac View File

@@ -0,0 +1,166 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(RtAudio, 4.0, gary@music.mcgill.ca, rtaudio)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(RtAudio.cpp)
AC_CONFIG_FILES([rtaudio-config Makefile tests/Makefile])

# Fill GXX with something before test.
AC_SUBST( GXX, ["no"] )

# Checks for programs.
AC_PROG_CXX(g++ CC c++ cxx)
AC_PROG_RANLIB
AC_PATH_PROG(AR, ar, no)
if [[ $AR = "no" ]] ; then
AC_MSG_ERROR("Could not find ar - needed to create a library");
fi

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/ioctl.h unistd.h)

# Check for debug
AC_MSG_CHECKING(whether to compile debug version)
AC_ARG_ENABLE(debug,
[ --enable-debug = enable various debug output],
[AC_SUBST( cppflag, [-D__RTAUDIO_DEBUG__] ) AC_SUBST( cxxflag, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
[AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O2] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])


# Checks for functions
AC_CHECK_FUNC(gettimeofday, [cppflag="$cppflag -DHAVE_GETTIMEOFDAY"], )

# For -I and -D flags
CPPFLAGS="$CPPFLAGS $cppflag"

# For debugging and optimization ... overwrite default because it has both -g and -O2
#CXXFLAGS="$CXXFLAGS $cxxflag"
CXXFLAGS="$cxxflag"

# Check compiler and use -Wall if gnu.
if [test $GXX = "yes" ;] then
AC_SUBST( cxxflag, [-Wall] )
fi

CXXFLAGS="$CXXFLAGS $cxxflag"

AC_CANONICAL_HOST

AC_SUBST( sharedlib, ["librtaudio.so"] )
AC_SUBST( sharedname, ["librtaudio.so.\$(RELEASE)"] )
AC_SUBST( libflags, ["-shared -Wl,-soname,\$(SHARED).\$(MAJOR) -o \$(SHARED).\$(RELEASE)"] )
case $host in
*-apple*)
AC_SUBST( sharedlib, ["librtaudio.dylib"] )
AC_SUBST( sharedname, ["librtaudio.\$(RELEASE).dylib"] )
AC_SUBST( libflags, ["-dynamiclib -o librtaudio.\$(RELEASE).dylib"] )
esac

# Checks for package options and external software
AC_SUBST( api, [""] )
AC_MSG_CHECKING(for audio API)
case $host in
*-*-netbsd*)
AC_MSG_RESULT(using OSS)
api="$api -D__LINUX_OSS__"
LIBS="$LIBS -lossaudio"
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))
;;

*-*-linux*)
AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (mac and linux only)], [
api="$api -D__UNIX_JACK__"
AC_MSG_RESULT(using JACK)
AC_CHECK_LIB(jack, jack_client_open, , 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!))], )

# Look for ALSA flag
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)], [
api="$api -D__LINUX_ALSA__"
AC_MSG_RESULT(using ALSA)
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))], )

# Look for PULSE flag
AC_ARG_WITH(pulse, [ --with-pulse = choose PulseAudio API support (linux only)], [
api="$api -D__LINUX_PULSE__"
AC_MSG_RESULT(using PulseAudio)
AC_CHECK_LIB(pulse-simple, pa_simple_new, , AC_MSG_ERROR(PulseAudio support requires the pulse-simple library!))], )

# Look for OSS flag
AC_ARG_WITH(oss, [ --with-oss = choose OSS API support (linux only)], [
api="$api -D__LINUX_OSS__"
AC_MSG_RESULT(using OSS)], )

# If no audio api flags specified, use ALSA
if [test "$api" == "";] then
AC_MSG_RESULT(using ALSA)
AC_SUBST( api, [-D__LINUX_ALSA__] )
AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))
fi

AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))
;;

*-apple*)
AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (unix only)], [
api="$api -D__UNIX_JACK__"
AC_MSG_RESULT(using JACK)
AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))], )

# AC_CHECK_HEADER(jack/jack.h, [], [AC_MSG_ERROR(Jack header file not found!)] )
# LIBS="$LIBS -framework jackmp" ], )


# Look for Core flag
AC_ARG_WITH(core, [ --with-core = choose CoreAudio API support (mac only)], [
api="$api -D__MACOSX_CORE__"
AC_MSG_RESULT(using CoreAudio)
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [], [AC_MSG_ERROR(CoreAudio header files not found!)] )
LIBS="$LIBS -framework CoreAudio -framework CoreFoundation" ], )

# If no audio api flags specified, use CoreAudio
if [test "$api" == ""; ] then
AC_SUBST( api, [-D__MACOSX_CORE__] )
AC_MSG_RESULT(using CoreAudio)
AC_CHECK_HEADER(CoreAudio/CoreAudio.h,
[],
[AC_MSG_ERROR(CoreAudio header files not found!)] )
AC_SUBST( LIBS, ["-framework CoreAudio -framework CoreFoundation"] )
fi

AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))
;;

*-mingw32*)
AC_ARG_WITH(asio, [ --with-asio = choose ASIO API support (windoze only)], [
api="$api -D__WINDOWS_ASIO__"
AC_MSG_RESULT(using ASIO)
AC_SUBST( objects, ["asio.o asiodrivers.o asiolist.o iasiothiscallresolver.o"] ) ], )

# Look for DirectSound flag
AC_ARG_WITH(ds, [ --with-ds = choose DirectSound API support (windoze only)], [
api="$api -D__WINDOWS_DS__"
AC_MSG_RESULT(using DirectSound)
LIBS="-ldsound -lwinmm $LIBS" ], )

# If no audio api flags specified, use DirectSound
if [test "$api" == "";] then
AC_SUBST( api, [-D__WINDOWS_DS__] )
AC_MSG_RESULT(using DirectSound)
LIBS="-ldsound -lwinmm $LIBS"
fi

LIBS="-lole32 $LIBS"
;;

*)
# Default case for unknown realtime systems.
AC_MSG_ERROR(Unknown system type for realtime support!)
;;
esac

CPPFLAGS="$CPPFLAGS $api"

AC_OUTPUT

chmod oug+x rtaudio-config

+ 70
- 0
source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/PyRtAudioTest.py View File

@@ -0,0 +1,70 @@
import rtaudio as rt
from math import cos
import struct
class audio_generator:
def __init__(self):
self.idx = -1
self.freq = 440.
def __call__(self):
self.idx += 1
if self.idx%48000 == 0:
self.freq *= 2**(1/12.)
return 0.5*cos(2.*3.1416*self.freq*self.idx/48000.)
class callback:
def __init__(self, gen):
self.gen = gen
self.i = 0
def __call__(self,playback, capture):
[struct.pack_into("f", playback, 4*o, self.gen()) for o in xrange(256)]
self.i = self.i + 256
if self.i > 48000*10:
print '.'
return 1
dac = rt.RtAudio()
n = dac.getDeviceCount()
print 'Number of devices available: ', n
for i in range(n):
try:
print dac.getDeviceInfo(i)
except rt.RtError as e:
print e
print 'Default output device: ', dac.getDefaultOutputDevice()
print 'Default input device: ', dac.getDefaultInputDevice()
print 'is stream open: ', dac.isStreamOpen()
print 'is stream running: ', dac.isStreamRunning()
oParams = {'deviceId': 1, 'nChannels': 1, 'firstChannel': 0}
iParams = {'deviceId': 1, 'nChannels': 1, 'firstChannel': 0}
try:
dac.openStream(oParams,oParams,48000,256,callback(audio_generator()) )
except rt.RtError as e:
print e
else:
dac.startStream()
import time
print 'latency: ', dac.getStreamLatency()
while (dac.isStreamRunning()):
time.sleep(0.1)
print dac.getStreamTime()
dac.stopStream()
dac.abortStream()
dac.closeStream()

+ 57
- 0
source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/readme View File

@@ -0,0 +1,57 @@
PyRtAudio - a python wrapper around RtAudio that allows to perform audio i/o operations in real-time from the python language.
By Antoine Lefebvre, 2011
This software is in the development stage. Do not expect compatibility
with future versions. Comments, suggestions, new features, bug fixes,
etc. are welcome.
This distribution of PyRtAudio contains the following:
- rtaudiomodule.cpp: the python wrapper code
- setup.py: a setup script use to compile and install PyRtAudio
- examples: a single PyRtAudioTest.py script
INSTALLATION
The compilation and installation of the PyRtAudio module is handled by
the python Distribution Utilities ("Distutils"). Provided that your
system has a C++ compiler and is properly configure, the following
command should be sufficient:
>> python setup.py install
Please refer to the distutils documentation for installation problems: http://docs.python.org/distutils/index.html
LEGAL AND ETHICAL:
The PyRtAudio license is the same as the RtAudio license:
PyRtAudio: a python wrapper around RtAudio
Copyright (c)2011 Antoine Lefebvre
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Any person wishing to distribute modifications to the Software is
asked to send the modifications to the original developer so that
they can be incorporated into the canonical version. This is,
however, not a binding provision of this license.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 605
- 0
source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/rtaudiomodule.cpp View File

@@ -0,0 +1,605 @@
/************************************************************************/
/* PyRtAudio: a python wrapper around RtAudio
Copyright (c) 2011 Antoine Lefebvre

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

Any person wishing to distribute modifications to the Software is
asked to send the modifications to the original developer so that
they can be incorporated into the canonical version. This is,
however, not a binding provision of this license.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/************************************************************************/

// This software is in the development stage
// Do not expect compatibility with future versions.
// Comments, suggestions, new features, bug fixes, etc. are welcome

#include <Python.h>

#include "RtAudio.h"

extern "C" {

typedef struct
{
PyObject_HEAD;
RtAudio *dac;
RtAudioFormat _format;
int _bufferSize;
unsigned int inputChannels;
PyObject *callback_func;
} PyRtAudio;

static PyObject *RtAudioError;

static int callback(void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *data )
{
PyRtAudio* self = (PyRtAudio*) data;

if (status == RTAUDIO_OUTPUT_UNDERFLOW)
printf("underflow.\n");

if (self == NULL) return -1;

float* in = (float *) inputBuffer;
float* out = (float *) outputBuffer;

PyObject *py_callback_func = self->callback_func;

int retval = 0;

if (py_callback_func) {
PyGILState_STATE gstate = PyGILState_Ensure();

PyObject* iBuffer = PyBuffer_FromMemory(in, sizeof(float) * self->inputChannels * nBufferFrames);
PyObject* oBuffer = PyBuffer_FromReadWriteMemory(out, sizeof(float) * nBufferFrames);
PyObject *arglist = Py_BuildValue("(O,O)", oBuffer, iBuffer);

if (arglist == NULL) {
printf("error.\n");
PyErr_Print();
PyGILState_Release(gstate);
return 2;
}

// Calling the callback
PyObject *result = PyEval_CallObject(py_callback_func, arglist);

if (PyErr_Occurred() != NULL) {
PyErr_Print();
}
else if PyInt_Check(result) {
retval = PyInt_AsLong(result);
}
Py_DECREF(arglist);
Py_DECREF(oBuffer);
Py_DECREF(iBuffer);
Py_XDECREF(result);

PyGILState_Release(gstate);
}

return retval;
}



static void RtAudio_dealloc(PyRtAudio *self)
{
printf("RtAudio_dealloc.\n");
if (self == NULL) return;

if (self->dac) {
self->dac->closeStream();
Py_CLEAR(self->callback_func);
delete self->dac;
}

self->ob_type->tp_free((PyObject *) self);
}


static PyObject* RtAudio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
printf("RtAudio_new.\n");
PyRtAudio *self;
char *api = NULL;

if(!PyArg_ParseTuple(args, "|s", &api))
return NULL;

self = (PyRtAudio *) type->tp_alloc(type, 0);

if(self == NULL) return NULL;

self->dac = NULL;
self->callback_func = NULL;

try {
if (api == NULL)
self->dac = new RtAudio;
else if(!strcmp(api, "jack"))
self->dac = new RtAudio(RtAudio::UNIX_JACK);
else if(!strcmp(api, "alsa"))
self->dac = new RtAudio(RtAudio::LINUX_ALSA);
else if(!strcmp(api, "oss"))
self->dac = new RtAudio(RtAudio::LINUX_ALSA);
else if(!strcmp(api, "core"))
self->dac = new RtAudio(RtAudio::MACOSX_CORE);
else if(!strcmp(api, "asio"))
self->dac = new RtAudio(RtAudio::WINDOWS_ASIO);
else if(!strcmp(api, "directsound"))
self->dac = new RtAudio(RtAudio::WINDOWS_DS);
}
catch (RtError &error) {
PyErr_SetString(RtAudioError, error.getMessage().c_str());
Py_INCREF(RtAudioError);
return NULL;
}

self->dac->showWarnings(false);

//Py_XINCREF(self);
return (PyObject *) self;
}

static int RtAudio_init(PyRtAudio *self, PyObject *args, PyObject *kwds)
{
printf("RtAudio_init.\n");
//if (self == NULL) return 0;
return 0;
}

// This functions does not yet support all the features of the RtAudio::openStream method.
// Please send your patches if you improves this.
static PyObject* RtAudio_openStream(PyRtAudio *self, PyObject *args)
{
if (self == NULL) return NULL;

if (self->dac == NULL) {
printf("the dac is null.\n");
Py_RETURN_NONE;
}

PyObject *oParamsObj;
PyObject *iParamsObj;
int fs;
unsigned int bf;
PyObject *pycallback;

if (!PyArg_ParseTuple(args, "OOiiO", &oParamsObj, &iParamsObj, &fs, &bf, &pycallback))
return NULL;

RtAudio::StreamParameters oParams;
oParams.deviceId = 1;
oParams.nChannels = 1;
oParams.firstChannel = 0;

if (PyDict_Check(oParamsObj)) {
if (PyDict_Contains(oParamsObj, PyString_FromString("deviceId"))) {
PyObject *value = PyDict_GetItem(oParamsObj, PyString_FromString("deviceId"));
oParams.deviceId = PyInt_AsLong(value);
}
if (PyDict_Contains(oParamsObj, PyString_FromString("nChannels"))) {
PyObject *value = PyDict_GetItem(oParamsObj, PyString_FromString("nChannels"));
oParams.nChannels = PyInt_AsLong(value);
}
if (PyDict_Contains(oParamsObj, PyString_FromString("firstChannel"))) {
PyObject *value = PyDict_GetItem(oParamsObj, PyString_FromString("firstChannel"));
oParams.firstChannel = PyInt_AsLong(value);
}
}
else {
printf("First argument must be a dictionary. Default values will be used.\n");
}

RtAudio::StreamParameters iParams;
iParams.deviceId = 1;
iParams.nChannels = 2;
iParams.firstChannel = 0;

if (PyDict_Check(iParamsObj)) {
if (PyDict_Contains(iParamsObj, PyString_FromString("deviceId"))) {
PyObject *value = PyDict_GetItem(iParamsObj, PyString_FromString("deviceId"));
iParams.deviceId = PyInt_AsLong(value);
}
if (PyDict_Contains(iParamsObj, PyString_FromString("nChannels"))) {
PyObject *value = PyDict_GetItem(iParamsObj, PyString_FromString("nChannels"));
iParams.nChannels = PyInt_AsLong(value);
}
if (PyDict_Contains(iParamsObj, PyString_FromString("firstChannel"))) {
PyObject *value = PyDict_GetItem(iParamsObj, PyString_FromString("firstChannel"));
iParams.firstChannel = PyInt_AsLong(value);
}
}
else {
printf("Second argument must be a dictionary. Default values will be used.\n");
}


if (!PyCallable_Check(pycallback)) {
PyErr_SetString(PyExc_TypeError, "Need a callable object!");
Py_XINCREF(PyExc_TypeError);
return NULL;
}

// sanity check the callback ?


Py_INCREF(pycallback); /* Add a reference to new callback */
self->callback_func = pycallback; /*Remember new callback */

// add support for other format
self->_format = RTAUDIO_FLOAT32;

// add support for other options
RtAudio::StreamOptions options;
options.flags = RTAUDIO_NONINTERLEAVED;

try {
if (self->dac->isStreamOpen())
self->dac->closeStream();
self->dac->openStream(&oParams, &iParams, self->_format, fs, &bf, &callback, self, &options);
}
catch ( RtError& error ) {
PyErr_SetString(RtAudioError, error.getMessage().c_str());
Py_INCREF(RtAudioError);
return NULL;
}

self->inputChannels = iParams.nChannels;

Py_RETURN_NONE;
}

static PyObject* RtAudio_closeStream(PyRtAudio *self, PyObject *args)
{
printf("RtAudio_closeStream.\n");
if (self == NULL || self->dac == NULL) return NULL;

try {
self->dac->closeStream();
Py_CLEAR(self->callback_func);
}
catch(RtError &error) {
PyErr_SetString(RtAudioError, error.getMessage().c_str());
Py_INCREF(RtAudioError);
return NULL;
}

Py_RETURN_NONE;
}

static PyObject* RtAudio_startStream(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;

try {
self->dac->startStream();
}
catch(RtError &error) {
PyErr_SetString(RtAudioError, error.getMessage().c_str());
Py_INCREF(RtAudioError);
return NULL;
}

Py_RETURN_NONE;
}


static PyObject* RtAudio_stopStream(PyRtAudio *self, PyObject *args)
{
printf("RtAudio_stopStream.\n");
if (self == NULL || self->dac == NULL) return NULL;

try {
self->dac->stopStream();
}
catch(RtError &error) {
PyErr_SetString(RtAudioError, error.getMessage().c_str());
Py_INCREF(RtAudioError);
return NULL;
}

Py_RETURN_NONE;
}

static PyObject* RtAudio_abortStream(PyRtAudio *self, PyObject *args)
{
printf("RtAudio_abortStream.\n");
if (self == NULL || self->dac == NULL) return NULL;

try {
self->dac->abortStream();
}
catch(RtError &error) {
PyErr_SetString(RtAudioError, error.getMessage().c_str());
Py_INCREF(RtAudioError);
return NULL;
}
Py_RETURN_NONE;
}

static PyObject* RtAudio_isStreamRunning(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;

if (self->dac == NULL) {
Py_RETURN_FALSE;
}
if (self->dac->isStreamRunning())
Py_RETURN_TRUE;
else
Py_RETURN_FALSE;
}

static PyObject* RtAudio_isStreamOpen(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;

if (self->dac == NULL) {
Py_RETURN_FALSE;
}
if (self->dac->isStreamOpen())
Py_RETURN_TRUE;
else
Py_RETURN_FALSE;

}

static PyObject* RtAudio_getDeviceCount(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;

return PyInt_FromLong(self->dac->getDeviceCount());
}

static PyObject* RtAudio_getDeviceInfo(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;

int device;
if (!PyArg_ParseTuple(args, "i", &device))
return NULL;

try {
RtAudio::DeviceInfo info = self->dac->getDeviceInfo(device);

PyObject* info_dict = PyDict_New();

if (info.probed) {
Py_INCREF(Py_True);
PyDict_SetItemString(info_dict, "probed", Py_True);
}
else {
Py_INCREF(Py_False);
PyDict_SetItemString(info_dict, "probed", Py_False);
}
PyObject* obj;

obj = PyString_FromString(info.name.c_str());
PyDict_SetItemString(info_dict, "name", obj);

obj = PyInt_FromLong(info.outputChannels);
PyDict_SetItemString(info_dict, "outputChannels", obj);

obj = PyInt_FromLong(info.inputChannels);
PyDict_SetItemString(info_dict, "inputChannels", obj);

obj = PyInt_FromLong(info.duplexChannels);
PyDict_SetItemString(info_dict, "duplexChannels", obj);

if (info.isDefaultOutput) {
Py_INCREF(Py_True);
PyDict_SetItemString(info_dict, "isDefaultOutput", Py_True);
}
else {
Py_INCREF(Py_False);
PyDict_SetItemString(info_dict, "isDefaultOutput", Py_False);
}

if (info.isDefaultInput) {
Py_INCREF(Py_True);
PyDict_SetItemString(info_dict, "isDefaultInput", Py_True);
}
else {
Py_INCREF(Py_False);
PyDict_SetItemString(info_dict, "isDefaultInput", Py_False);
}

return info_dict;

}
catch(RtError &error) {
PyErr_SetString(RtAudioError, error.getMessage().c_str());
Py_INCREF(RtAudioError);
return NULL;
}
}

static PyObject* RtAudio_getDefaultOutputDevice(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;
return PyInt_FromLong(self->dac->getDefaultOutputDevice());
}

static PyObject* RtAudio_getDefaultInputDevice(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;
return PyInt_FromLong(self->dac->getDefaultInputDevice());
}

static PyObject* RtAudio_getStreamTime(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;
return PyFloat_FromDouble( self->dac->getStreamTime() );
}

static PyObject* RtAudio_getStreamLatency(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;
return PyInt_FromLong( self->dac->getStreamLatency() );
}

static PyObject* RtAudio_getStreamSampleRate(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;
return PyInt_FromLong( self->dac->getStreamSampleRate() );
}

static PyObject* RtAudio_showWarnings(PyRtAudio *self, PyObject *args)
{
if (self == NULL || self->dac == NULL) return NULL;

PyObject *obj;
if (!PyArg_ParseTuple(args, "O", &obj))
return NULL;

if (!PyBool_Check(obj))
return NULL;

if (obj == Py_True)
self->dac->showWarnings(true);
else if (obj == Py_False)
self->dac->showWarnings(false);
else {
printf("not true nor false\n");
}
Py_RETURN_NONE;
}


static PyMethodDef RtAudio_methods[] =
{
// TO BE DONE: getCurrentApi(void)
{"getDeviceCount", (PyCFunction) RtAudio_getDeviceCount, METH_NOARGS,
"A public function that queries for the number of audio devices available."},
{"getDeviceInfo", (PyCFunction) RtAudio_getDeviceInfo, METH_VARARGS,
"Return a dictionary with information for a specified device number."},
{"getDefaultOutputDevice", (PyCFunction) RtAudio_getDefaultOutputDevice, METH_NOARGS,
"A function that returns the index of the default output device."},
{"getDefaultInputDevice", (PyCFunction) RtAudio_getDefaultInputDevice, METH_NOARGS,
"A function that returns the index of the default input device."},
{"openStream", (PyCFunction) RtAudio_openStream, METH_VARARGS,
"A public method for opening a stream with the specified parameters."},
{"closeStream", (PyCFunction) RtAudio_closeStream, METH_NOARGS,
"A function that closes a stream and frees any associated stream memory. "},
{"startStream", (PyCFunction) RtAudio_startStream, METH_NOARGS,
"A function that starts a stream. "},
{"stopStream", (PyCFunction) RtAudio_stopStream, METH_NOARGS,
"Stop a stream, allowing any samples remaining in the output queue to be played. "},
{"abortStream", (PyCFunction) RtAudio_abortStream, METH_NOARGS,
"Stop a stream, discarding any samples remaining in the input/output queue."},
{"isStreamOpen", (PyCFunction) RtAudio_isStreamOpen, METH_NOARGS,
"Returns true if a stream is open and false if not."},
{"isStreamRunning", (PyCFunction) RtAudio_isStreamRunning, METH_NOARGS,
"Returns true if the stream is running and false if it is stopped or not open."},
{"getStreamTime", (PyCFunction) RtAudio_getStreamTime, METH_NOARGS,
"Returns the number of elapsed seconds since the stream was started."},
{"getStreamLatency", (PyCFunction) RtAudio_getStreamLatency, METH_NOARGS,
"Returns the internal stream latency in sample frames."},
{"getStreamSampleRate", (PyCFunction) RtAudio_getStreamSampleRate, METH_NOARGS,
"Returns actual sample rate in use by the stream."},
{"showWarnings", (PyCFunction) RtAudio_showWarnings, METH_VARARGS,
"Specify whether warning messages should be printed to stderr."},
// TO BE DONE: getCompiledApi (std::vector< RtAudio::Api > &apis) throw ()
{NULL}
};


static PyTypeObject RtAudio_type = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"rtaudio.RtAudio", /*tp_name*/
sizeof(RtAudio), /*tp_basicsize*/
0, /*tp_itemsize*/
(destructor) RtAudio_dealloc, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash */
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT, /*tp_flags*/
"Audio input device", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
RtAudio_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)RtAudio_init, /* tp_init */
0, /* tp_alloc */
RtAudio_new, /* tp_new */
0, /* Low-level free-memory routine */
0, /* For PyObject_IS_GC */
0, // PyObject *tp_bases;
0, // PyObject *tp_mro; /* method resolution order */
0, //PyObject *tp_cache;
0, //PyObject *tp_subclasses;
0, //PyObject *tp_weaklist;
0, //destructor tp_del;
//0, /* Type attribute cache version tag. Added in version 2.6 */
};



#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
#define PyMODINIT_FUNC void
#endif
PyMODINIT_FUNC
initrtaudio(void)
{
PyEval_InitThreads();

if (PyType_Ready(&RtAudio_type) < 0)
return;

PyObject* module = Py_InitModule3("rtaudio", NULL, "RtAudio wrapper.");
if (module == NULL)
return;

Py_INCREF(&RtAudio_type);
PyModule_AddObject(module, "RtAudio", (PyObject *)&RtAudio_type);

RtAudioError = PyErr_NewException("rtaudio.RtError", NULL, NULL);
Py_INCREF(RtAudioError);
PyModule_AddObject(module, "RtError", RtAudioError);
}
}

+ 58
- 0
source/backend/engine/rtaudio-4.0.11/contrib/python/pyrtaudio/setup.py View File

@@ -0,0 +1,58 @@
#!/bin/env python

import os
from distutils.core import setup, Extension

if hasattr(os, 'uname'):
OSNAME = os.uname()[0]
else:
OSNAME = 'Windows'


define_macros = []
libraries = []
extra_link_args = []
extra_compile_args = ['-I../../../']
sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp']


if OSNAME == 'Linux':
define_macros=[("__LINUX_ALSA__", ''),
('__LINUX_JACK__', ''),
('__LINUX_OSS__', '')]
libraries = ['asound', 'jack', 'pthread']

elif OSNAME == 'Darwin':
define_macros = [('__MACOSX_CORE__', '')]
libraries = ['pthread', 'stdc++']
extra_link_args = ['-framework', 'CoreAudio']

elif OSNAME == 'Windows':
define_macros = [('__WINDOWS_DS__', None),
('__WINDOWS_ASIO__', None),
('__LITTLE_ENDIAN__',None),
('WIN32',None)]
libraries = ['winmm', 'dsound', 'Advapi32','Ole32','User32']
sources += ['../../../include/asio.cpp',
'../../../include/asiodrivers.cpp',
'../../../include/asiolist.cpp',
'../../../include/iasiothiscallresolver.cpp']
extra_compile_args.append('-I../../../include/')
extra_compile_args.append('-EHsc')



audio = Extension('rtaudio',
sources=sources,
libraries=libraries,
define_macros=define_macros,
extra_compile_args = extra_compile_args,
extra_link_args = extra_link_args,
)


setup(name = 'rtaudio',
version = '0.1',
description = 'Python RtAudio interface',
ext_modules = [audio])


+ 1572
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/Doxyfile
File diff suppressed because it is too large
View File


+ 28
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/acknowledge.txt View File

@@ -0,0 +1,28 @@
/*! \page acknowledge Acknowledgements

Many thanks to the following people for providing bug fixes and improvements:
<UL>
<LI>Stefan Arisona</LI>
<LI>Vincent B&eacute;nony</LI>
<LI>Rasmus Ekman</LI>
<LI>Anders Ervik</LI>
<LI>Robin Davies (Windows DS and ASIO)</LI>
<LI>Martin Koegler</LI>
<LI>Dmitry Kostjuchenko</LI>
<LI>Oliver Larkin</LI>
<LI>Antoine Lefebvre</LI>
<LI>Carlos Luna</LI>
<LI>Dominic Mazzoni</LI>
<LI>Tristan Matthews</LI>
<LI>Peter Meerwald (PulseAudio)</LI>
<LI>Benjamin Schroeder</LI>
<LI>Ryan Williams (Windows non-MS compiler ASIO support)</LI>
<LI>Ed Wildgoose (Linux ALSA and Jack)</LI>

</UL>

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.

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>. All recent versions of RtAudio have been completed while working as an assistant / associate 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).

*/

+ 39
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/apinotes.txt View File

@@ -0,0 +1,39 @@
/*! \page apinotes API Notes

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.

\section linux Linux:

RtAudio for Linux was developed under Redhat distributions 7.0 - Fedora. Four different audio APIs are supported on Linux platforms: <A href="http://www.opensound.com/oss.html">OSS</A> (versions >= 4.0), <A href="http://www.alsa-project.org/">ALSA</A>, <A href="http://jackit.sourceforge.net/">Jack</A>, and <A href="http://www.freedesktop.org/wiki/Software/PulseAudio">PulseAudio</A>. Note that RtAudio now only supports the newer version 4.0 OSS API. The ALSA API is now part of the Linux kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 1.0 and higher versions of ALSA. Jack 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.

\section macosx Macintosh OS-X (CoreAudio and Jack):

The Apple CoreAudio API 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. 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.

The RtAudio Jack support can be compiled on Macintosh OS-X systems, as well as in Linux.

\section windowsds Windows (DirectSound):

The \c configure script provides support for the MinGW compiler. DirectSound support is specified with the "--with-ds" flag.

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, especially since RtAudio version 3.0.2. Input audio latency still tends to be bad but better since version 3.0.2. RtAudio was originally developed with Visual C++ version 6.0 but has been tested with .NET.

The DirectSound version of RtAudio can be compiled with or without the UNICODE preprocessor definition.

\section windowsasio Windows (ASIO):

ASIO support using MinGW and the \c configure script is specified with the "--with-asio" flag.

The Steinberg ASIO audio 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; iasiothiscallresolver.h,cpp</TT>. The Visual C++ projects found in <TT>/tests/Windows/</TT> compile both ASIO and DirectSound support.

The Steinberg provided <TT>asiolist</TT> class does not compile when the preprocessor definition UNICODE is defined. Note that this could be an issue when using RtAudio with Qt, though Qt programs appear to compile without the UNICODE definition (try <tt>DEFINES -= UNICODE</tt> in your .pro file). RtAudio with ASIO support has been tested using the MinGW compiler under Windows XP, as well as in the Visual Studio environment.

*/

+ 84
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/compiling.txt View File

@@ -0,0 +1,84 @@
/*! \page compiling Debugging & Compiling

\section debug Debugging

If you are having problems getting RtAudio to run on your system, make sure to pass a value of \e true to the RtAudio::showWarnings() function (this is the default setting). A variety of warning messages will be displayed which may help in determining the problem. Also, try using the programs included in the <tt>tests</tt> directory. The program <tt>audioprobe</tt> displays the queried capabilities of all hardware devices found for all APIs compiled. When using the ALSA and JACK APIs, further information can be displayed by defining the preprocessor definition __RTAUDIO_DEBUG__.

\section compile Compiling

In order to compile RtAudio for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:
<P>

<TABLE BORDER=2 COLS=5 WIDTH="100%">
<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>
</TR>
<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 audioprobe audioprobe.cpp RtAudio.cpp -lasound -lpthread</TT></TD>
</TR>
<TR>
<TD>Linux</TD>
<TD>PulseAudio</TD>
<TD>RtApiPulse</TD>
<TD>__LINUX_PULSE__</TD>
<TD><TT>pthread</TT></TD>
<TD><TT>g++ -Wall -D__LINUX_PULSE__ -o audioprobe audioprobe.cpp RtAudio.cpp -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 audioprobe audioprobe.cpp RtAudio.cpp -lpthread</TT></TD>
</TR>
<TR>
<TD>Linux or Macintosh OS-X</TD>
<TD>Jack Audio Server</TD>
<TD>RtApiJack</TD>
<TD>__UNIX_JACK__</TD>
<TD><TT>jack, pthread</TT></TD>
<TD><TT>g++ -Wall -D__UNIX_JACK__ -o audioprobe audioprobe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread</TT></TD>
</TR>

<TR>
<TD>Macintosh OS-X</TD>
<TD>CoreAudio</TD>
<TD>RtApiCore</TD>
<TD>__MACOSX_CORE__</TD>
<TD><TT>pthread, CoreAudio</TT></TD>
<TD><TT>g++ -Wall -D__MACOSX_CORE__ -o audioprobe audioprobe.cpp RtAudio.cpp -framework CoreAudio -lpthread</TT></TD>
</TR>
<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>
</TR>
<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>
</TR>
</TABLE>
<P>

The example compiler statements above could be used to compile the <TT>audioprobe.cpp</TT> example file, assuming that <TT>audioprobe.cpp</TT>, <TT>RtAudio.h</TT>, <tt>RtError.h</tt>, and <TT>RtAudio.cpp</TT> all exist in the same directory.


*/

+ 76
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/duplex.txt View File

@@ -0,0 +1,76 @@
/*! \page duplex Duplex Mode

Finally, it is easy to use RtAudio for simultaneous audio input/output, or duplex operation. In this example, we simply pass the input data back to the output.

\code
#include "RtAudio.h"
#include <iostream>
#include <cstdlib>
#include <cstring>

// Pass-through function.
int inout( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *data )
{
// Since the number of input and output channels is equal, we can do
// a simple buffer copy operation here.
if ( status ) std::cout << "Stream over/underflow detected." << std::endl;

unsigned long *bytes = (unsigned long *) data;
memcpy( outputBuffer, inputBuffer, *bytes );
return 0;
}

int main()
{
RtAudio adac;
if ( adac.getDeviceCount() < 1 ) {
std::cout << "\nNo audio devices found!\n";
exit( 0 );
}

// Set the same number of channels for both input and output.
unsigned int bufferBytes, bufferFrames = 512;
RtAudio::StreamParameters iParams, oParams;
iParams.deviceId = 0; // first available device
iParams.nChannels = 2;
oParams.deviceId = 0; // first available device
oParams.nChannels = 2;

try {
adac.openStream( &oParams, &iParams, RTAUDIO_SINT32, 44100, &bufferFrames, &inout, (void *)&bufferBytes );
}
catch ( RtError& e ) {
e.printMessage();
exit( 0 );
}

bufferBytes = bufferFrames * 2 * 4;

try {
adac.startStream();

char input;
std::cout << "\nRunning ... press <enter> to quit.\n";
std::cin.get(input);

// Stop the stream.
adac.stopStream();
}
catch ( RtError& e ) {
e.printMessage();
goto cleanup;
}

cleanup:
if ( adac.isStreamOpen() ) adac.closeStream();

return 0;
}
\endcode

In this example, audio recorded by the stream input will be played out during the next round of audio processing.

Note that a duplex stream can make use of two different devices (except when using the Linux Jack and Windows ASIO APIs). However, this may cause timing problems due to possible device clock variations, unless a common external "sync" is provided.

*/

+ 5
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/error.txt View File

@@ -0,0 +1,5 @@
/*! \page errors Error Handling

RtAudio makes restrained use of C++ exceptions. That is, exceptions are thrown only when system errors occur that prevent further class operation or when the user makes invalid function calls. In other cases, a warning message may be displayed and an appropriate value is returned. For example, if a system error occurs when processing the RtAudio::getDeviceCount() function, the return value is zero. In such a case, the user cannot expect to make use of most other RtAudio functions because no devices are available (and thus a stream cannot be opened). A client can call the function RtAudio::showWarnings() with a boolean argument to enable or disable the printing of warning messages to <tt>stderr</tt>. By default, warning messages are displayed. There is a protected RtAudio method, error(), that can be modified to globally control how these messages are handled and reported.

*/

+ 8
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/footer.html View File

@@ -0,0 +1,8 @@
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 10
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/header.html View File

@@ -0,0 +1,10 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>

+ 30
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/license.txt View File

@@ -0,0 +1,30 @@
/*! \page license License

RtAudio: a set of realtime audio i/o C++ classes<BR>
Copyright (c) 2001-2012 Gary P. Scavone

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

Any person wishing to distribute modifications to the Software is
asked to send the modifications to the original developer so that
they can be incorporated into the canonical version. This is,
however, not a binding provision of this license.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*/

+ 7
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/multi.txt View File

@@ -0,0 +1,7 @@
/*! \page 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 no available devices are found, 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 an ASIO instance and then a DirectSound instance (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 unlikely that the same device could be simultaneously controlled with two different audio APIs.

The static function RtAudio::getCompiledApi() is provided to determine the available compiled API support. The function RtAudio::getCurrentApi() indicates the API selected for a given RtAudio instance.

*/

+ 82
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/playback.txt View File

@@ -0,0 +1,82 @@
/*! \page playback Playback

In this example, we provide a complete program that demonstrates the use of RtAudio for audio playback. Our program produces a two-channel sawtooth waveform for output.

\code
#include "RtAudio.h"
#include <iostream>
#include <cstdlib>

// Two-channel sawtooth wave generator.
int saw( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *userData )
{
unsigned int i, j;
double *buffer = (double *) outputBuffer;
double *lastValues = (double *) userData;

if ( status )
std::cout << "Stream underflow detected!" << std::endl;

// Write interleaved audio data.
for ( i=0; i<nBufferFrames; i++ ) {
for ( j=0; j<2; j++ ) {
*buffer++ = lastValues[j];

lastValues[j] += 0.005 * (j+1+(j*0.1));
if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0;
}
}

return 0;
}

int main()
{
RtAudio dac;
if ( dac.getDeviceCount() < 1 ) {
std::cout << "\nNo audio devices found!\n";
exit( 0 );
}

RtAudio::StreamParameters parameters;
parameters.deviceId = dac.getDefaultOutputDevice();
parameters.nChannels = 2;
parameters.firstChannel = 0;
unsigned int sampleRate = 44100;
unsigned int bufferFrames = 256; // 256 sample frames
double data[2];

try {
dac.openStream( &parameters, NULL, RTAUDIO_FLOAT64,
sampleRate, &bufferFrames, &saw, (void *)&data );
dac.startStream();
}
catch ( RtError& e ) {
e.printMessage();
exit( 0 );
}
char input;
std::cout << "\nPlaying ... press <enter> to quit.\n";
std::cin.get( input );

try {
// Stop the stream
dac.stopStream();
}
catch (RtError& e) {
e.printMessage();
}

if ( dac.isStreamOpen() ) dac.closeStream();

return 0;
}
\endcode

We open the stream in exactly the same way as the previous example (except with a data format change) and specify the address of our callback function \e "saw()". The callback function will automatically be invoked when the underlying audio system needs data for output. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() functions). We can also pass a pointer value to the RtAudio::openStream() function that is made available in the callback function. In this way, it is possible to gain access to arbitrary data created in our \e main() function from within the globally defined callback function.

In this example, we stop the stream with an explicit call to RtAudio::stopStream(). It is also possible to stop a stream by returning a non-zero value from the callback function. A return value of 1 will cause the stream to finish draining its internal buffers and then halt (equivalent to calling the RtAudio::stopStream() function). A return value of 2 will cause the stream to stop immediately (equivalent to calling the RtAudio::abortStream() function).

*/

+ 70
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/probe.txt View File

@@ -0,0 +1,70 @@
/*! \page probe Probing Device Capabilities

A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done.

\code

// audioprobe.cpp

#include <iostream>
#include "RtAudio.h"

int main()
{
RtAudio audio;

// Determine the number of devices available
unsigned int devices = audio.getDeviceCount();

// Scan through devices for various capabilities
RtAudio::DeviceInfo info;
for ( unsigned int i=0; i<=devices; i++ ) {

info = audio.getDeviceInfo( i );

if ( info.probed == true ) {
// Print, for example, the maximum number of output channels for each device
std::cout << "device = " << i;
std::cout << ": maximum output channels = " << info.outputChannels << "\n";
}
}

return 0;
}
\endcode

The RtAudio::DeviceInfo structure is defined in RtAudio.h and provides a variety of information useful in assessing the capabilities of a device:

\code
typedef struct RtAudio::DeviceInfo {
bool probed; // true if the device capabilities were successfully probed.
std::string name; // Character string device identifier.
unsigned int outputChannels; // Maximum output channels supported by device.
unsigned int inputChannels; // Maximum input channels supported by device.
unsigned int duplexChannels; // Maximum simultaneous input/output channels supported by device.
bool isDefaultOutput; // true if this is the default output device.
bool isDefaultInput; // true if this is the default input device.
std::vector<unsigned 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 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 (lower 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 \c nativeFormats member of the RtAudio::DeviceInfo 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 \c probed member of the RtAudio::DeviceInfo structure is false, the remaining structure members are undefined and the device is probably unusable.

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 queried values when attempting to open a stream.

*/

+ 68
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/recording.txt View File

@@ -0,0 +1,68 @@
/*! \page recording Recording


Using RtAudio for audio input is almost identical to the way it is used for playback. Here's the blocking playback example rewritten for recording:

\code
#include "RtAudio.h"
#include <iostream>
#include <cstdlib>
#include <cstring>

int record( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *userData )
{
if ( status )
std::cout << "Stream overflow detected!" << std::endl;

// Do something with the data in the "inputBuffer" buffer.

return 0;
}

int main()
{
RtAudio adc;
if ( adc.getDeviceCount() < 1 ) {
std::cout << "\nNo audio devices found!\n";
exit( 0 );
}

RtAudio::StreamParameters parameters;
parameters.deviceId = adc.getDefaultInputDevice();
parameters.nChannels = 2;
parameters.firstChannel = 0;
unsigned int sampleRate = 44100;
unsigned int bufferFrames = 256; // 256 sample frames

try {
adc.openStream( NULL, &parameters, RTAUDIO_SINT16,
sampleRate, &bufferFrames, &record );
adc.startStream();
}
catch ( RtError& e ) {
e.printMessage();
exit( 0 );
}
char input;
std::cout << "\nRecording ... press <enter> to quit.\n";
std::cin.get( input );

try {
// Stop the stream
adc.stopStream();
}
catch (RtError& e) {
e.printMessage();
}

if ( adc.isStreamOpen() ) adc.closeStream();

return 0;
}
\endcode

In this example, we pass the address of the stream parameter structure as the second argument of the RtAudio::openStream() function and pass a NULL value for the output stream parameters. In this example, the \e record() callback function performs no specific operations.

*/

+ 48
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/settings.txt View File

@@ -0,0 +1,48 @@
/*! \page settings Device Settings

The next step in using RtAudio is to open a stream with particular device and parameter settings.

\code

#include "RtAudio.h"

int main()
{
RtAudio dac;
if ( dac.getDeviceCount() == 0 ) exit( 0 );

RtAudio::StreamParameters parameters;
parameters.deviceId = dac.getDefaultOutputDevice();
parameters.nChannels = 2;
unsigned int sampleRate = 44100;
unsigned int bufferFrames = 256; // 256 sample frames

RtAudio::StreamOptions options;
options.flags = RTAUDIO_NONINTERLEAVED;

try {
dac.openStream( &parameters, NULL, RTAUDIO_FLOAT32,
sampleRate, &bufferFrames, &myCallback, NULL, &options );
}
catch ( RtError& e ) {
std::cout << '\n' << e.getMessage() << '\n' << std::endl;
exit( 0 );
}
return 0;
}
\endcode

The RtAudio::openStream() function attempts to open a stream with a specified set of parameter values. In the above example, we attempt to open a two channel playback stream using the default output device, 32-bit floating point data, a sample rate of 44100 Hz, and a frame rate of 256 sample frames per output buffer. If the user specifies an invalid parameter value (such as a device id greater than or equal to the number of enumerated devices), an RtError is thrown of type = INVALID_USE. If a system error occurs or the device does not support the specified parameter values, an RtError of type = SYSTEM_ERROR is thrown. In either case, a descriptive error message is bundled with the exception and can be queried with the RtError::getMessage() or RtError::what() functions.

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 \c bufferFrames parameter specifies the desired number of sample frames that will be written to and/or read from a device per write/read operation. This parameter can be used to control stream latency though there is no guarantee that the passed value will be that used by a device. In general, a lower \c bufferFrames value will produce less latency but perhaps less robust performance. A value of zero can be specified, in which case the smallest allowable value will be used. The \c bufferFrames parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. \c bufferFrames values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Stream latency can also be controlled via the optional RtAudio::StreamOptions member \c numberOfBuffers (not used in the example above), though this tends to be more system dependent. In particular, the \c numberOfBuffers parameter is ignored when using the OS-X Core Audio, Jack, and the Windows ASIO APIs.

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.

The RtAudioCallback parameter above is a pointer to a user-defined function that will be called whenever the audio system is ready for new output data or has new input data to be read. Further details on the use of a callback function are provided in the next section.

Several stream options are available to fine-tune the behavior of an audio stream. In the example above, we specify that data will be written by the user in a \e non-interleaved format via the RtAudio::StreamOptions member \c flags. That is, all \c bufferFrames of the first channel should be written consecutively, followed by all \c bufferFrames of the second channel. By default (when no option is specified), RtAudio expects data to be written in an \e interleaved format.

*/

+ 54
- 0
source/backend/engine/rtaudio-4.0.11/doc/doxygen/tutorial.txt View File

@@ -0,0 +1,54 @@
/*! \mainpage The RtAudio Home Page

RtAudio is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:

<UL>
<LI>object-oriented C++ design</LI>
<LI>simple, common API across all supported platforms</LI>
<LI>only one source and two header files for easy inclusion in programming projects</LI>
<LI>allow simultaneous multi-api support</LI>
<LI>support dynamic connection of devices</LI>
<LI>provide extensive audio device parameter control</LI>
<LI>allow audio device capability probing</LI>
<LI>automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping</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. 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.

\section whatsnew What's New (Version 4.0)

RtAudio V4 represents a significant rewrite of the code and includes a number of API and functionality changes from previous versions. A partial list of the changes includes:
- new support for non-interleaved user data
- additional input/output parameter specifications, including channel offset
- new support for dynamic connection of devices
- new support for stream time
- revised callback arguments, including separate input and output buffer arguments
- revised C++ exception handling
- updated support for OSS version 4.0
- discontinued support of blocking functionality
- discontinued support of SGI

Devices are now re-enumerated every time the RtAudio::getDeviceCount(), RtAudio::getDeviceInfo(), and RtAudio::openStream() functions are called. This allows for the proper identification of hot-pluggable (USB, Firewire, ...) devices that are connected after an RtAudio instance is created.

\section download Download

Latest Release (14 June 2012): <A href="http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.11.tar.gz">Version 4.0.11</A>

\section documentation Documentation Links

-# \ref errors
-# \ref probe
-# \ref settings
-# \ref playback
-# \ref recording
-# \ref duplex
-# \ref multi
-# \ref compiling
-# \ref apinotes
-# \ref acknowledge
-# \ref license
-# <A href="bugs.html">Bug Tracker</A>
-# <A href="updates.html">Possible Updates</A>
-# <A href="http://sourceforge.net/projects/rtaudio">RtAudio at SourceForge</A>

*/

+ 641
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/RtAudio_8h-source.html View File

@@ -0,0 +1,641 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.5.8 -->
<h1>RtAudio.h</h1><a href="RtAudio_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/************************************************************************/</span>
<a name="l00039"></a>00039 <span class="comment">/************************************************************************/</span>
<a name="l00040"></a>00040
<a name="l00045"></a>00045 <span class="comment">// RtAudio: Version 4.0.6</span>
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="preprocessor">#ifndef __RTAUDIO_H</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define __RTAUDIO_H</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00052"></a>00052 <span class="preprocessor">#include "RtError.h"</span>
<a name="l00053"></a>00053
<a name="l00070"></a><a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8">00070</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a>;
<a name="l00071"></a>00071 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT8 = 0x1; <span class="comment">// 8-bit signed integer.</span>
<a name="l00072"></a>00072 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT16 = 0x2; <span class="comment">// 16-bit signed integer.</span>
<a name="l00073"></a>00073 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT24 = 0x4; <span class="comment">// Lower 3 bytes of 32-bit signed integer.</span>
<a name="l00074"></a>00074 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT32 = 0x8; <span class="comment">// 32-bit signed integer.</span>
<a name="l00075"></a>00075 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_FLOAT32 = 0x10; <span class="comment">// Normalized between plus/minus 1.0.</span>
<a name="l00076"></a>00076 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_FLOAT64 = 0x20; <span class="comment">// Normalized between plus/minus 1.0.</span>
<a name="l00077"></a>00077
<a name="l00115"></a><a class="code" href="RtAudio_8h.html#2c0f59b200dcec4d4e760f9166b29c41">00115</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="RtAudio_8h.html#2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a>;
<a name="l00116"></a>00116 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_NONINTERLEAVED = 0x1; <span class="comment">// Use non-interleaved buffers (default = interleaved).</span>
<a name="l00117"></a>00117 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_MINIMIZE_LATENCY = 0x2; <span class="comment">// Attempt to set stream parameters for lowest possible latency.</span>
<a name="l00118"></a>00118 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_HOG_DEVICE = 0x4; <span class="comment">// Attempt grab device and prevent use by others.</span>
<a name="l00119"></a>00119 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_SCHEDULE_REALTIME = 0x8; <span class="comment">// Try to select realtime scheduling for callback thread.</span>
<a name="l00120"></a>00120
<a name="l00132"></a><a class="code" href="RtAudio_8h.html#80e306d363583da3b0a1b65d9b57c806">00132</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="RtAudio_8h.html#80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a>;
<a name="l00133"></a>00133 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> RTAUDIO_INPUT_OVERFLOW = 0x1; <span class="comment">// Input data was discarded because of an overflow condition at the driver.</span>
<a name="l00134"></a>00134 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> RTAUDIO_OUTPUT_UNDERFLOW = 0x2; <span class="comment">// The output buffer ran low, likely causing a gap in the output sound.</span>
<a name="l00135"></a>00135
<a name="l00137"></a>00137
<a name="l00175"></a><a class="code" href="RtAudio_8h.html#112c7b7e25a974977f6fc094cef1a31f">00175</a> <span class="keyword">typedef</span> int (*<a class="code" href="RtAudio_8h.html#112c7b7e25a974977f6fc094cef1a31f" title="RtAudio callback function prototype.">RtAudioCallback</a>)( <span class="keywordtype">void</span> *outputBuffer, <span class="keywordtype">void</span> *inputBuffer,
<a name="l00176"></a>00176 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames,
<a name="l00177"></a>00177 <span class="keywordtype">double</span> streamTime,
<a name="l00178"></a>00178 <a class="code" href="RtAudio_8h.html#80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> status,
<a name="l00179"></a>00179 <span class="keywordtype">void</span> *userData );
<a name="l00180"></a>00180
<a name="l00181"></a>00181
<a name="l00182"></a>00182 <span class="comment">// **************************************************************** //</span>
<a name="l00183"></a>00183 <span class="comment">//</span>
<a name="l00184"></a>00184 <span class="comment">// RtAudio class declaration.</span>
<a name="l00185"></a>00185 <span class="comment">//</span>
<a name="l00186"></a>00186 <span class="comment">// RtAudio is a "controller" used to select an available audio i/o</span>
<a name="l00187"></a>00187 <span class="comment">// interface. It presents a common API for the user to call but all</span>
<a name="l00188"></a>00188 <span class="comment">// functionality is implemented by the class RtApi and its</span>
<a name="l00189"></a>00189 <span class="comment">// subclasses. RtAudio creates an instance of an RtApi subclass</span>
<a name="l00190"></a>00190 <span class="comment">// based on the user's API choice. If no choice is made, RtAudio</span>
<a name="l00191"></a>00191 <span class="comment">// attempts to make a "logical" API selection.</span>
<a name="l00192"></a>00192 <span class="comment">//</span>
<a name="l00193"></a>00193 <span class="comment">// **************************************************************** //</span>
<a name="l00194"></a>00194
<a name="l00195"></a>00195 <span class="keyword">class </span>RtApi;
<a name="l00196"></a>00196
<a name="l00197"></a><a class="code" href="classRtAudio.html">00197</a> <span class="keyword">class </span><a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>
<a name="l00198"></a>00198 {
<a name="l00199"></a>00199 <span class="keyword">public</span>:
<a name="l00200"></a>00200
<a name="l00202"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849">00202</a> <span class="keyword">enum</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">Api</a> {
<a name="l00203"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849a49af3ac767106158bc6cad74fb214ae">00203</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849a49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a>,
<a name="l00204"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849a7a2ba095c2806caa893b6fb8fc3a1a8">00204</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849a7a2ba095c2806caa893b6fb8fc3a1a8">LINUX_ALSA</a>,
<a name="l00205"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d84939c84615e61de75e6a4e865596d62c82">00205</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d84939c84615e61de75e6a4e865596d62c82">LINUX_OSS</a>,
<a name="l00206"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d8494767e17c6edfbd827f91763915df4105">00206</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d8494767e17c6edfbd827f91763915df4105">UNIX_JACK</a>,
<a name="l00207"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d8499fec92b8272244a87a6a11a717bd662d">00207</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d8499fec92b8272244a87a6a11a717bd662d">MACOSX_CORE</a>,
<a name="l00208"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849219517d1df90f94d07758481155bd469">00208</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849219517d1df90f94d07758481155bd469">WINDOWS_ASIO</a>,
<a name="l00209"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d84928478830f42c2fd61e6c7ad498901931">00209</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d84928478830f42c2fd61e6c7ad498901931">WINDOWS_DS</a>,
<a name="l00210"></a><a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849b06b8fd88bf18c9a2b8271f6961ae2d1">00210</a> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849b06b8fd88bf18c9a2b8271f6961ae2d1">RTAUDIO_DUMMY</a>
<a name="l00211"></a>00211 };
<a name="l00212"></a>00212
<a name="l00214"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html">00214</a> <span class="keyword">struct </span><a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">DeviceInfo</a> {
<a name="l00215"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#5bf008c629ef493c713ec870d0217407">00215</a> <span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#5bf008c629ef493c713ec870d0217407">probed</a>;
<a name="l00216"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a0e2ea10c52c206c9e105ac76b01f194">00216</a> std::string <a class="code" href="structRtAudio_1_1DeviceInfo.html#a0e2ea10c52c206c9e105ac76b01f194">name</a>;
<a name="l00217"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#185f8aac1095de4fbb6e0076875d24c4">00217</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#185f8aac1095de4fbb6e0076875d24c4">outputChannels</a>;
<a name="l00218"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#731b31adf84c550ab98329be1baa58b4">00218</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#731b31adf84c550ab98329be1baa58b4">inputChannels</a>;
<a name="l00219"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#ca6ecfb8b5b8c114c54809d8af50ee5b">00219</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#ca6ecfb8b5b8c114c54809d8af50ee5b">duplexChannels</a>;
<a name="l00220"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#af74fc23f451fdd22ed073a47f0db674">00220</a> <span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#af74fc23f451fdd22ed073a47f0db674">isDefaultOutput</a>;
<a name="l00221"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a8b03618fa1d4c051f6add14bb031728">00221</a> <span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a8b03618fa1d4c051f6add14bb031728">isDefaultInput</a>;
<a name="l00222"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#5b158efcbfbd30e7226df92d0109d475">00222</a> std::vector&lt;unsigned int&gt; <a class="code" href="structRtAudio_1_1DeviceInfo.html#5b158efcbfbd30e7226df92d0109d475">sampleRates</a>;
<a name="l00223"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#97559ee4a1f2c8cfb765949e6193e1f4">00223</a> <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> <a class="code" href="structRtAudio_1_1DeviceInfo.html#97559ee4a1f2c8cfb765949e6193e1f4">nativeFormats</a>;
<a name="l00225"></a>00225 <span class="comment">// Default constructor.</span>
<a name="l00226"></a>00226 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">DeviceInfo</a>()
<a name="l00227"></a>00227 :<a class="code" href="structRtAudio_1_1DeviceInfo.html#5bf008c629ef493c713ec870d0217407">probed</a>(false), <a class="code" href="structRtAudio_1_1DeviceInfo.html#185f8aac1095de4fbb6e0076875d24c4">outputChannels</a>(0), <a class="code" href="structRtAudio_1_1DeviceInfo.html#731b31adf84c550ab98329be1baa58b4">inputChannels</a>(0), <a class="code" href="structRtAudio_1_1DeviceInfo.html#ca6ecfb8b5b8c114c54809d8af50ee5b">duplexChannels</a>(0),
<a name="l00228"></a>00228 <a class="code" href="structRtAudio_1_1DeviceInfo.html#af74fc23f451fdd22ed073a47f0db674">isDefaultOutput</a>(false), <a class="code" href="structRtAudio_1_1DeviceInfo.html#a8b03618fa1d4c051f6add14bb031728">isDefaultInput</a>(false), <a class="code" href="structRtAudio_1_1DeviceInfo.html#97559ee4a1f2c8cfb765949e6193e1f4">nativeFormats</a>(0) {}
<a name="l00229"></a>00229 };
<a name="l00230"></a>00230
<a name="l00232"></a><a class="code" href="structRtAudio_1_1StreamParameters.html">00232</a> <span class="keyword">struct </span><a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">StreamParameters</a> {
<a name="l00233"></a><a class="code" href="structRtAudio_1_1StreamParameters.html#ffd27496c70c0986522056234c64e28e">00233</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamParameters.html#ffd27496c70c0986522056234c64e28e">deviceId</a>;
<a name="l00234"></a><a class="code" href="structRtAudio_1_1StreamParameters.html#78798b65fada7941e1a7e47c11c9e627">00234</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamParameters.html#78798b65fada7941e1a7e47c11c9e627">nChannels</a>;
<a name="l00235"></a><a class="code" href="structRtAudio_1_1StreamParameters.html#ddc8281f23a87455ec6dedbc766a74db">00235</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamParameters.html#ddc8281f23a87455ec6dedbc766a74db">firstChannel</a>;
<a name="l00237"></a>00237 <span class="comment">// Default constructor.</span>
<a name="l00238"></a>00238 <a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">StreamParameters</a>()
<a name="l00239"></a>00239 : <a class="code" href="structRtAudio_1_1StreamParameters.html#ffd27496c70c0986522056234c64e28e">deviceId</a>(0), <a class="code" href="structRtAudio_1_1StreamParameters.html#78798b65fada7941e1a7e47c11c9e627">nChannels</a>(0), <a class="code" href="structRtAudio_1_1StreamParameters.html#ddc8281f23a87455ec6dedbc766a74db">firstChannel</a>(0) {}
<a name="l00240"></a>00240 };
<a name="l00241"></a>00241
<a name="l00243"></a>00243
<a name="l00294"></a><a class="code" href="structRtAudio_1_1StreamOptions.html">00294</a> <span class="keyword">struct </span><a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">StreamOptions</a> {
<a name="l00295"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#6a284d045b8adcfcf178a4f6a22330f8">00295</a> <a class="code" href="RtAudio_8h.html#2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> <a class="code" href="structRtAudio_1_1StreamOptions.html#6a284d045b8adcfcf178a4f6a22330f8">flags</a>;
<a name="l00296"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#5a04d3c3d0c1cfa063872ecff383af1d">00296</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamOptions.html#5a04d3c3d0c1cfa063872ecff383af1d">numberOfBuffers</a>;
<a name="l00297"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#214da35056f18ffb7c8e4dc074a01a9a">00297</a> std::string <a class="code" href="structRtAudio_1_1StreamOptions.html#214da35056f18ffb7c8e4dc074a01a9a">streamName</a>;
<a name="l00298"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#81b364f137d1ee1073b74dac666af352">00298</a> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamOptions.html#81b364f137d1ee1073b74dac666af352">priority</a>;
<a name="l00300"></a>00300 <span class="comment">// Default constructor.</span>
<a name="l00301"></a>00301 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">StreamOptions</a>()
<a name="l00302"></a>00302 : <a class="code" href="structRtAudio_1_1StreamOptions.html#6a284d045b8adcfcf178a4f6a22330f8">flags</a>(0), <a class="code" href="structRtAudio_1_1StreamOptions.html#5a04d3c3d0c1cfa063872ecff383af1d">numberOfBuffers</a>(0), <a class="code" href="structRtAudio_1_1StreamOptions.html#81b364f137d1ee1073b74dac666af352">priority</a>(0) {}
<a name="l00303"></a>00303 };
<a name="l00304"></a>00304
<a name="l00306"></a>00306
<a name="l00311"></a>00311 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#e266ffad2ef428d0b2c6c262d391ce26" title="A static function to determine the available compiled audio APIs.">getCompiledApi</a>( std::vector&lt;RtAudio::Api&gt; &amp;apis ) <span class="keywordflow">throw</span>();
<a name="l00312"></a>00312
<a name="l00314"></a>00314
<a name="l00322"></a>00322 <a class="code" href="classRtAudio.html#fd0bfa26deae9804e18faff59d0273d9" title="The class constructor.">RtAudio</a>( <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> api=<a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849a49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a> ) throw();
<a name="l00323"></a>00323
<a name="l00325"></a>00325
<a name="l00329"></a>00329 ~<a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>() throw();
<a name="l00330"></a>00330
<a name="l00332"></a>00332 <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::<a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">Api</a> <a class="code" href="classRtAudio.html#83687634795792b2c47e4ae1cf8a5246" title="Returns the audio API specifier for the current instance of RtAudio.">getCurrentApi</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00333"></a>00333
<a name="l00335"></a>00335
<a name="l00340"></a>00340 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00341"></a>00341
<a name="l00343"></a>00343
<a name="l00353"></a>00353 <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::DeviceInfo <a class="code" href="classRtAudio.html#02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00354"></a>00354
<a name="l00356"></a>00356
<a name="l00363"></a>00363 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">getDefaultOutputDevice</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00364"></a>00364
<a name="l00366"></a>00366
<a name="l00373"></a>00373 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#ad8b94edd3cd379ee300b125750ac6ce" title="A function that returns the index of the default input device.">getDefaultInputDevice</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00374"></a>00374
<a name="l00376"></a>00376
<a name="l00413"></a>00413 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#facc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::StreamParameters *outputParameters,
<a name="l00414"></a>00414 <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::StreamParameters *inputParameters,
<a name="l00415"></a>00415 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00416"></a>00416 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferFrames, <a class="code" href="RtAudio_8h.html#112c7b7e25a974977f6fc094cef1a31f" title="RtAudio callback function prototype.">RtAudioCallback</a> callback,
<a name="l00417"></a>00417 <span class="keywordtype">void</span> *userData = NULL, <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::StreamOptions *options = NULL );
<a name="l00418"></a>00418
<a name="l00420"></a>00420
<a name="l00424"></a>00424 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">closeStream</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00425"></a>00425
<a name="l00427"></a>00427
<a name="l00433"></a>00433 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#ec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">startStream</a>( <span class="keywordtype">void</span> );
<a name="l00434"></a>00434
<a name="l00436"></a>00436
<a name="l00442"></a>00442 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#f4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">stopStream</a>( <span class="keywordtype">void</span> );
<a name="l00443"></a>00443
<a name="l00445"></a>00445
<a name="l00451"></a>00451 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#d0586b47cd6bb9591a80b4052815991f" title="Stop a stream, discarding any samples remaining in the input/output queue.">abortStream</a>( <span class="keywordtype">void</span> );
<a name="l00452"></a>00452
<a name="l00454"></a>00454 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">isStreamOpen</a>( <span class="keywordtype">void</span> ) const throw();
<a name="l00455"></a>00455
<a name="l00457"></a>00457 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#84cc8d9b7ab9bc5f37bcf48430ec5aea" title="Returns true if the stream is running and false if it is stopped or not open.">isStreamRunning</a>( <span class="keywordtype">void</span> ) const throw();
<a name="l00458"></a>00458
<a name="l00460"></a>00460
<a name="l00463"></a>00463 <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#344e59a62353c5791db4621b985cb2ca" title="Returns the number of elapsed seconds since the stream was started.">getStreamTime</a>( <span class="keywordtype">void</span> );
<a name="l00464"></a>00464
<a name="l00466"></a>00466
<a name="l00474"></a>00474 <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#843c989d9f501c71bc2f2c5ca18df9f3" title="Returns the internal stream latency in sample frames.">getStreamLatency</a>( <span class="keywordtype">void</span> );
<a name="l00475"></a>00475
<a name="l00477"></a>00477
<a name="l00482"></a>00482 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#28214b8b05d60b45c24ee6fae7b2a0b5" title="Returns actual sample rate in use by the stream.">getStreamSampleRate</a>( <span class="keywordtype">void</span> );
<a name="l00483"></a>00483
<a name="l00485"></a>00485 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#f0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">showWarnings</a>( <span class="keywordtype">bool</span> value = true ) throw();
<a name="l00486"></a>00486
<a name="l00487"></a>00487 protected:
<a name="l00488"></a>00488
<a name="l00489"></a>00489 <span class="keywordtype">void</span> openRtApi( <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::<a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">Api</a> api );
<a name="l00490"></a>00490 RtApi *rtapi_;
<a name="l00491"></a>00491 };
<a name="l00492"></a>00492
<a name="l00493"></a>00493 <span class="comment">// Operating system dependent thread functionality.</span>
<a name="l00494"></a>00494 <span class="preprocessor">#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)</span>
<a name="l00495"></a>00495 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;windows.h&gt;</span>
<a name="l00496"></a>00496 <span class="preprocessor"> #include &lt;process.h&gt;</span>
<a name="l00497"></a>00497
<a name="l00498"></a>00498 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ThreadHandle;
<a name="l00499"></a>00499 <span class="keyword">typedef</span> CRITICAL_SECTION StreamMutex;
<a name="l00500"></a>00500
<a name="l00501"></a>00501 <span class="preprocessor">#elif defined(__LINUX_ALSA__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)</span>
<a name="l00502"></a>00502 <span class="preprocessor"></span> <span class="comment">// Using pthread library for various flavors of unix.</span>
<a name="l00503"></a>00503 <span class="preprocessor"> #include &lt;pthread.h&gt;</span>
<a name="l00504"></a>00504
<a name="l00505"></a>00505 <span class="keyword">typedef</span> pthread_t ThreadHandle;
<a name="l00506"></a>00506 <span class="keyword">typedef</span> pthread_mutex_t StreamMutex;
<a name="l00507"></a>00507
<a name="l00508"></a>00508 <span class="preprocessor">#else // Setup for "dummy" behavior</span>
<a name="l00509"></a>00509 <span class="preprocessor"></span>
<a name="l00510"></a>00510 <span class="preprocessor"> #define __RTAUDIO_DUMMY__</span>
<a name="l00511"></a>00511 <span class="preprocessor"></span> <span class="keyword">typedef</span> <span class="keywordtype">int</span> ThreadHandle;
<a name="l00512"></a>00512 <span class="keyword">typedef</span> <span class="keywordtype">int</span> StreamMutex;
<a name="l00513"></a>00513
<a name="l00514"></a>00514 <span class="preprocessor">#endif</span>
<a name="l00515"></a>00515 <span class="preprocessor"></span>
<a name="l00516"></a>00516 <span class="comment">// This global structure type is used to pass callback information</span>
<a name="l00517"></a>00517 <span class="comment">// between the private RtAudio stream structure and global callback</span>
<a name="l00518"></a>00518 <span class="comment">// handling functions.</span>
<a name="l00519"></a>00519 <span class="keyword">struct </span>CallbackInfo {
<a name="l00520"></a>00520 <span class="keywordtype">void</span> *object; <span class="comment">// Used as a "this" pointer.</span>
<a name="l00521"></a>00521 ThreadHandle thread;
<a name="l00522"></a>00522 <span class="keywordtype">void</span> *callback;
<a name="l00523"></a>00523 <span class="keywordtype">void</span> *userData;
<a name="l00524"></a>00524 <span class="keywordtype">void</span> *apiInfo; <span class="comment">// void pointer for API specific callback information</span>
<a name="l00525"></a>00525 <span class="keywordtype">bool</span> isRunning;
<a name="l00526"></a>00526
<a name="l00527"></a>00527 <span class="comment">// Default constructor.</span>
<a name="l00528"></a>00528 CallbackInfo()
<a name="l00529"></a>00529 :object(0), callback(0), userData(0), apiInfo(0), isRunning(false) {}
<a name="l00530"></a>00530 };
<a name="l00531"></a>00531
<a name="l00532"></a>00532 <span class="comment">// **************************************************************** //</span>
<a name="l00533"></a>00533 <span class="comment">//</span>
<a name="l00534"></a>00534 <span class="comment">// RtApi class declaration.</span>
<a name="l00535"></a>00535 <span class="comment">//</span>
<a name="l00536"></a>00536 <span class="comment">// Subclasses of RtApi contain all API- and OS-specific code necessary</span>
<a name="l00537"></a>00537 <span class="comment">// to fully implement the RtAudio API.</span>
<a name="l00538"></a>00538 <span class="comment">//</span>
<a name="l00539"></a>00539 <span class="comment">// Note that RtApi is an abstract base class and cannot be</span>
<a name="l00540"></a>00540 <span class="comment">// explicitly instantiated. The class RtAudio will create an</span>
<a name="l00541"></a>00541 <span class="comment">// instance of an RtApi subclass (RtApiOss, RtApiAlsa,</span>
<a name="l00542"></a>00542 <span class="comment">// RtApiJack, RtApiCore, RtApiAl, RtApiDs, or RtApiAsio).</span>
<a name="l00543"></a>00543 <span class="comment">//</span>
<a name="l00544"></a>00544 <span class="comment">// **************************************************************** //</span>
<a name="l00545"></a>00545
<a name="l00546"></a>00546 <span class="preprocessor">#if defined( HAVE_GETTIMEOFDAY )</span>
<a name="l00547"></a>00547 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;sys/time.h&gt;</span>
<a name="l00548"></a>00548 <span class="preprocessor">#endif</span>
<a name="l00549"></a>00549 <span class="preprocessor"></span>
<a name="l00550"></a>00550 <span class="preprocessor">#include &lt;sstream&gt;</span>
<a name="l00551"></a>00551
<a name="l00552"></a>00552 <span class="keyword">class </span>RtApi
<a name="l00553"></a>00553 {
<a name="l00554"></a>00554 <span class="keyword">public</span>:
<a name="l00555"></a>00555
<a name="l00556"></a>00556 RtApi();
<a name="l00557"></a>00557 <span class="keyword">virtual</span> ~RtApi();
<a name="l00558"></a>00558 <span class="keyword">virtual</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> <a class="code" href="classRtAudio.html#83687634795792b2c47e4ae1cf8a5246" title="Returns the audio API specifier for the current instance of RtAudio.">getCurrentApi</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00559"></a>00559 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00560"></a>00560 <span class="keyword">virtual</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> <a class="code" href="classRtAudio.html#02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) = 0;
<a name="l00561"></a>00561 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#ad8b94edd3cd379ee300b125750ac6ce" title="A function that returns the index of the default input device.">getDefaultInputDevice</a>( <span class="keywordtype">void</span> );
<a name="l00562"></a>00562 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">getDefaultOutputDevice</a>( <span class="keywordtype">void</span> );
<a name="l00563"></a>00563 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#facc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( <a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> *outputParameters,
<a name="l00564"></a>00564 <a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> *inputParameters,
<a name="l00565"></a>00565 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00566"></a>00566 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferFrames, <a class="code" href="RtAudio_8h.html#112c7b7e25a974977f6fc094cef1a31f" title="RtAudio callback function prototype.">RtAudioCallback</a> callback,
<a name="l00567"></a>00567 <span class="keywordtype">void</span> *userData, <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00568"></a>00568 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">closeStream</a>( <span class="keywordtype">void</span> );
<a name="l00569"></a>00569 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#ec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">startStream</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00570"></a>00570 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#f4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">stopStream</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00571"></a>00571 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#d0586b47cd6bb9591a80b4052815991f" title="Stop a stream, discarding any samples remaining in the input/output queue.">abortStream</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00572"></a>00572 <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#843c989d9f501c71bc2f2c5ca18df9f3" title="Returns the internal stream latency in sample frames.">getStreamLatency</a>( <span class="keywordtype">void</span> );
<a name="l00573"></a>00573 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#28214b8b05d60b45c24ee6fae7b2a0b5" title="Returns actual sample rate in use by the stream.">getStreamSampleRate</a>( <span class="keywordtype">void</span> );
<a name="l00574"></a>00574 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#344e59a62353c5791db4621b985cb2ca" title="Returns the number of elapsed seconds since the stream was started.">getStreamTime</a>( <span class="keywordtype">void</span> );
<a name="l00575"></a>00575 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">isStreamOpen</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> stream_.state != STREAM_CLOSED; };
<a name="l00576"></a>00576 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#84cc8d9b7ab9bc5f37bcf48430ec5aea" title="Returns true if the stream is running and false if it is stopped or not open.">isStreamRunning</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> stream_.state == STREAM_RUNNING; };
<a name="l00577"></a>00577 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#f0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">showWarnings</a>( <span class="keywordtype">bool</span> value ) { showWarnings_ = value; };
<a name="l00578"></a>00578
<a name="l00579"></a>00579
<a name="l00580"></a>00580 <span class="keyword">protected</span>:
<a name="l00581"></a>00581
<a name="l00582"></a>00582 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MAX_SAMPLE_RATES;
<a name="l00583"></a>00583 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SAMPLE_RATES[];
<a name="l00584"></a>00584
<a name="l00585"></a>00585 <span class="keyword">enum</span> { FAILURE, SUCCESS };
<a name="l00586"></a>00586
<a name="l00587"></a>00587 <span class="keyword">enum</span> StreamState {
<a name="l00588"></a>00588 STREAM_STOPPED,
<a name="l00589"></a>00589 STREAM_RUNNING,
<a name="l00590"></a>00590 STREAM_CLOSED = -50
<a name="l00591"></a>00591 };
<a name="l00592"></a>00592
<a name="l00593"></a>00593 <span class="keyword">enum</span> StreamMode {
<a name="l00594"></a>00594 OUTPUT,
<a name="l00595"></a>00595 INPUT,
<a name="l00596"></a>00596 DUPLEX,
<a name="l00597"></a>00597 UNINITIALIZED = -75
<a name="l00598"></a>00598 };
<a name="l00599"></a>00599
<a name="l00600"></a>00600 <span class="comment">// A protected structure used for buffer conversion.</span>
<a name="l00601"></a>00601 <span class="keyword">struct </span>ConvertInfo {
<a name="l00602"></a>00602 <span class="keywordtype">int</span> channels;
<a name="l00603"></a>00603 <span class="keywordtype">int</span> inJump, outJump;
<a name="l00604"></a>00604 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> inFormat, outFormat;
<a name="l00605"></a>00605 std::vector&lt;int&gt; inOffset;
<a name="l00606"></a>00606 std::vector&lt;int&gt; outOffset;
<a name="l00607"></a>00607 };
<a name="l00608"></a>00608
<a name="l00609"></a>00609 <span class="comment">// A protected structure for audio streams.</span>
<a name="l00610"></a>00610 <span class="keyword">struct </span>RtApiStream {
<a name="l00611"></a>00611 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00612"></a>00612 <span class="keywordtype">void</span> *apiHandle; <span class="comment">// void pointer for API specific stream handle information</span>
<a name="l00613"></a>00613 StreamMode mode; <span class="comment">// OUTPUT, INPUT, or DUPLEX.</span>
<a name="l00614"></a>00614 StreamState state; <span class="comment">// STOPPED, RUNNING, or CLOSED</span>
<a name="l00615"></a>00615 <span class="keywordtype">char</span> *userBuffer[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00616"></a>00616 <span class="keywordtype">char</span> *deviceBuffer;
<a name="l00617"></a>00617 <span class="keywordtype">bool</span> doConvertBuffer[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00618"></a>00618 <span class="keywordtype">bool</span> userInterleaved;
<a name="l00619"></a>00619 <span class="keywordtype">bool</span> deviceInterleaved[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00620"></a>00620 <span class="keywordtype">bool</span> doByteSwap[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00621"></a>00621 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate;
<a name="l00622"></a>00622 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferSize;
<a name="l00623"></a>00623 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nBuffers;
<a name="l00624"></a>00624 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nUserChannels[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00625"></a>00625 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nDeviceChannels[2]; <span class="comment">// Playback and record channels, respectively.</span>
<a name="l00626"></a>00626 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channelOffset[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00627"></a>00627 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> latency[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00628"></a>00628 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> userFormat;
<a name="l00629"></a>00629 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> deviceFormat[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00630"></a>00630 StreamMutex mutex;
<a name="l00631"></a>00631 CallbackInfo callbackInfo;
<a name="l00632"></a>00632 ConvertInfo convertInfo[2];
<a name="l00633"></a>00633 <span class="keywordtype">double</span> streamTime; <span class="comment">// Number of elapsed seconds since the stream started.</span>
<a name="l00634"></a>00634
<a name="l00635"></a>00635 <span class="preprocessor">#if defined(HAVE_GETTIMEOFDAY)</span>
<a name="l00636"></a>00636 <span class="preprocessor"></span> <span class="keyword">struct </span>timeval lastTickTimestamp;
<a name="l00637"></a>00637 <span class="preprocessor">#endif</span>
<a name="l00638"></a>00638 <span class="preprocessor"></span>
<a name="l00639"></a>00639 RtApiStream()
<a name="l00640"></a>00640 :apiHandle(0), deviceBuffer(0) { device[0] = 11111; device[1] = 11111; }
<a name="l00641"></a>00641 };
<a name="l00642"></a>00642
<a name="l00643"></a>00643 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> Int16;
<a name="l00644"></a>00644 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> Int32;
<a name="l00645"></a>00645 <span class="keyword">typedef</span> <span class="keywordtype">float</span> Float32;
<a name="l00646"></a>00646 <span class="keyword">typedef</span> <span class="keywordtype">double</span> Float64;
<a name="l00647"></a>00647
<a name="l00648"></a>00648 std::ostringstream errorStream_;
<a name="l00649"></a>00649 std::string errorText_;
<a name="l00650"></a>00650 <span class="keywordtype">bool</span> showWarnings_;
<a name="l00651"></a>00651 RtApiStream stream_;
<a name="l00652"></a>00652
<a name="l00660"></a>00660 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00661"></a>00661 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00662"></a>00662 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00663"></a>00663 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00664"></a>00664
<a name="l00666"></a>00666 <span class="keywordtype">void</span> tickStreamTime( <span class="keywordtype">void</span> );
<a name="l00667"></a>00667
<a name="l00669"></a>00669 <span class="keywordtype">void</span> clearStreamInfo();
<a name="l00670"></a>00670
<a name="l00675"></a>00675 <span class="keywordtype">void</span> verifyStream( <span class="keywordtype">void</span> );
<a name="l00676"></a>00676
<a name="l00678"></a>00678 <span class="keywordtype">void</span> error( <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">RtError::Type</a> type );
<a name="l00679"></a>00679
<a name="l00684"></a>00684 <span class="keywordtype">void</span> convertBuffer( <span class="keywordtype">char</span> *outBuffer, <span class="keywordtype">char</span> *inBuffer, ConvertInfo &amp;info );
<a name="l00685"></a>00685
<a name="l00687"></a>00687 <span class="keywordtype">void</span> byteSwapBuffer( <span class="keywordtype">char</span> *buffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> samples, <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format );
<a name="l00688"></a>00688
<a name="l00690"></a>00690 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> formatBytes( <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format );
<a name="l00691"></a>00691
<a name="l00693"></a>00693 <span class="keywordtype">void</span> setConvertInfo( StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel );
<a name="l00694"></a>00694 };
<a name="l00695"></a>00695
<a name="l00696"></a>00696 <span class="comment">// **************************************************************** //</span>
<a name="l00697"></a>00697 <span class="comment">//</span>
<a name="l00698"></a>00698 <span class="comment">// Inline RtAudio definitions.</span>
<a name="l00699"></a>00699 <span class="comment">//</span>
<a name="l00700"></a>00700 <span class="comment">// **************************************************************** //</span>
<a name="l00701"></a>00701
<a name="l00702"></a><a class="code" href="classRtAudio.html#83687634795792b2c47e4ae1cf8a5246">00702</a> <span class="keyword">inline</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> <a class="code" href="classRtAudio.html#83687634795792b2c47e4ae1cf8a5246" title="Returns the audio API specifier for the current instance of RtAudio.">RtAudio :: getCurrentApi</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getCurrentApi(); }
<a name="l00703"></a><a class="code" href="classRtAudio.html#747ce2d73803641bbb66d6e78092aa1a">00703</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">RtAudio :: getDeviceCount</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceCount(); }
<a name="l00704"></a><a class="code" href="classRtAudio.html#02d7ff44ad1d7eae22283a052f3dfda8">00704</a> <span class="keyword">inline</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> <a class="code" href="classRtAudio.html#02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">RtAudio :: getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceInfo( device ); }
<a name="l00705"></a><a class="code" href="classRtAudio.html#ad8b94edd3cd379ee300b125750ac6ce">00705</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#ad8b94edd3cd379ee300b125750ac6ce" title="A function that returns the index of the default input device.">RtAudio :: getDefaultInputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultInputDevice(); }
<a name="l00706"></a><a class="code" href="classRtAudio.html#3a3f3dbe13ea696b521e49cdaaa357bc">00706</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">RtAudio :: getDefaultOutputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultOutputDevice(); }
<a name="l00707"></a><a class="code" href="classRtAudio.html#90d599002ad32cf250a4cb866f2cc93a">00707</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">RtAudio :: closeStream</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;closeStream(); }
<a name="l00708"></a><a class="code" href="classRtAudio.html#ec017a89629ccef66a90b60be22a2f80">00708</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#ec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">RtAudio :: startStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;startStream(); }
<a name="l00709"></a><a class="code" href="classRtAudio.html#f4c241ff86936ecc8108f0d9dfe3efdd">00709</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#f4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">RtAudio :: stopStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;stopStream(); }
<a name="l00710"></a><a class="code" href="classRtAudio.html#d0586b47cd6bb9591a80b4052815991f">00710</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#d0586b47cd6bb9591a80b4052815991f" title="Stop a stream, discarding any samples remaining in the input/output queue.">RtAudio :: abortStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;abortStream(); }
<a name="l00711"></a><a class="code" href="classRtAudio.html#3863e45ff81dbe97176de0ee7545917f">00711</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">RtAudio :: isStreamOpen</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamOpen(); }
<a name="l00712"></a><a class="code" href="classRtAudio.html#84cc8d9b7ab9bc5f37bcf48430ec5aea">00712</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#84cc8d9b7ab9bc5f37bcf48430ec5aea" title="Returns true if the stream is running and false if it is stopped or not open.">RtAudio :: isStreamRunning</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamRunning(); }
<a name="l00713"></a><a class="code" href="classRtAudio.html#843c989d9f501c71bc2f2c5ca18df9f3">00713</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#843c989d9f501c71bc2f2c5ca18df9f3" title="Returns the internal stream latency in sample frames.">RtAudio :: getStreamLatency</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamLatency(); }
<a name="l00714"></a><a class="code" href="classRtAudio.html#28214b8b05d60b45c24ee6fae7b2a0b5">00714</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#28214b8b05d60b45c24ee6fae7b2a0b5" title="Returns actual sample rate in use by the stream.">RtAudio :: getStreamSampleRate</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamSampleRate(); };
<a name="l00715"></a><a class="code" href="classRtAudio.html#344e59a62353c5791db4621b985cb2ca">00715</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#344e59a62353c5791db4621b985cb2ca" title="Returns the number of elapsed seconds since the stream was started.">RtAudio :: getStreamTime</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamTime(); }
<a name="l00716"></a><a class="code" href="classRtAudio.html#f0752ee51cce3dd90a3bd009f9fdbe77">00716</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#f0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">RtAudio :: showWarnings</a>( <span class="keywordtype">bool</span> value ) <span class="keywordflow">throw</span>() { rtapi_-&gt;showWarnings( value ); }
<a name="l00717"></a>00717
<a name="l00718"></a>00718 <span class="comment">// RtApi Subclass prototypes.</span>
<a name="l00719"></a>00719
<a name="l00720"></a>00720 <span class="preprocessor">#if defined(__MACOSX_CORE__)</span>
<a name="l00721"></a>00721 <span class="preprocessor"></span>
<a name="l00722"></a>00722 <span class="preprocessor">#include &lt;CoreAudio/AudioHardware.h&gt;</span>
<a name="l00723"></a>00723
<a name="l00724"></a>00724 <span class="keyword">class </span>RtApiCore: <span class="keyword">public</span> RtApi
<a name="l00725"></a>00725 {
<a name="l00726"></a>00726 <span class="keyword">public</span>:
<a name="l00727"></a>00727
<a name="l00728"></a>00728 RtApiCore();
<a name="l00729"></a>00729 ~RtApiCore();
<a name="l00730"></a>00730 <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d8499fec92b8272244a87a6a11a717bd662d">RtAudio::MACOSX_CORE</a>; };
<a name="l00731"></a>00731 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00732"></a>00732 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00733"></a>00733 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultOutputDevice( <span class="keywordtype">void</span> );
<a name="l00734"></a>00734 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultInputDevice( <span class="keywordtype">void</span> );
<a name="l00735"></a>00735 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00736"></a>00736 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00737"></a>00737 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00738"></a>00738 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00739"></a>00739 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00740"></a>00740
<a name="l00741"></a>00741 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00742"></a>00742 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00743"></a>00743 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00744"></a>00744 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00745"></a>00745 <span class="keywordtype">bool</span> callbackEvent( AudioDeviceID deviceId,
<a name="l00746"></a>00746 <span class="keyword">const</span> AudioBufferList *inBufferList,
<a name="l00747"></a>00747 <span class="keyword">const</span> AudioBufferList *outBufferList );
<a name="l00748"></a>00748
<a name="l00749"></a>00749 <span class="keyword">private</span>:
<a name="l00750"></a>00750
<a name="l00751"></a>00751 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00752"></a>00752 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00753"></a>00753 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00754"></a>00754 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00755"></a>00755 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* getErrorCode( OSStatus code );
<a name="l00756"></a>00756 };
<a name="l00757"></a>00757
<a name="l00758"></a>00758 <span class="preprocessor">#endif</span>
<a name="l00759"></a>00759 <span class="preprocessor"></span>
<a name="l00760"></a>00760 <span class="preprocessor">#if defined(__UNIX_JACK__)</span>
<a name="l00761"></a>00761 <span class="preprocessor"></span>
<a name="l00762"></a>00762 <span class="keyword">class </span>RtApiJack: <span class="keyword">public</span> RtApi
<a name="l00763"></a>00763 {
<a name="l00764"></a>00764 <span class="keyword">public</span>:
<a name="l00765"></a>00765
<a name="l00766"></a>00766 RtApiJack();
<a name="l00767"></a>00767 ~RtApiJack();
<a name="l00768"></a>00768 <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d8494767e17c6edfbd827f91763915df4105">RtAudio::UNIX_JACK</a>; };
<a name="l00769"></a>00769 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00770"></a>00770 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00771"></a>00771 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00772"></a>00772 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00773"></a>00773 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00774"></a>00774 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00775"></a>00775 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00776"></a>00776
<a name="l00777"></a>00777 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00778"></a>00778 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00779"></a>00779 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00780"></a>00780 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00781"></a>00781 <span class="keywordtype">bool</span> callbackEvent( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> nframes );
<a name="l00782"></a>00782
<a name="l00783"></a>00783 <span class="keyword">private</span>:
<a name="l00784"></a>00784
<a name="l00785"></a>00785 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00786"></a>00786 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00787"></a>00787 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00788"></a>00788 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00789"></a>00789 };
<a name="l00790"></a>00790
<a name="l00791"></a>00791 <span class="preprocessor">#endif</span>
<a name="l00792"></a>00792 <span class="preprocessor"></span>
<a name="l00793"></a>00793 <span class="preprocessor">#if defined(__WINDOWS_ASIO__)</span>
<a name="l00794"></a>00794 <span class="preprocessor"></span>
<a name="l00795"></a>00795 <span class="keyword">class </span>RtApiAsio: <span class="keyword">public</span> RtApi
<a name="l00796"></a>00796 {
<a name="l00797"></a>00797 <span class="keyword">public</span>:
<a name="l00798"></a>00798
<a name="l00799"></a>00799 RtApiAsio();
<a name="l00800"></a>00800 ~RtApiAsio();
<a name="l00801"></a>00801 <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849219517d1df90f94d07758481155bd469">RtAudio::WINDOWS_ASIO</a>; };
<a name="l00802"></a>00802 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00803"></a>00803 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00804"></a>00804 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00805"></a>00805 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00806"></a>00806 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00807"></a>00807 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00808"></a>00808 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00809"></a>00809
<a name="l00810"></a>00810 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00811"></a>00811 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00812"></a>00812 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00813"></a>00813 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00814"></a>00814 <span class="keywordtype">bool</span> callbackEvent( <span class="keywordtype">long</span> bufferIndex );
<a name="l00815"></a>00815
<a name="l00816"></a>00816 <span class="keyword">private</span>:
<a name="l00817"></a>00817
<a name="l00818"></a>00818 std::vector&lt;RtAudio::DeviceInfo&gt; devices_;
<a name="l00819"></a>00819 <span class="keywordtype">void</span> saveDeviceInfo( <span class="keywordtype">void</span> );
<a name="l00820"></a>00820 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00821"></a>00821 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00822"></a>00822 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00823"></a>00823 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00824"></a>00824 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00825"></a>00825 };
<a name="l00826"></a>00826
<a name="l00827"></a>00827 <span class="preprocessor">#endif</span>
<a name="l00828"></a>00828 <span class="preprocessor"></span>
<a name="l00829"></a>00829 <span class="preprocessor">#if defined(__WINDOWS_DS__)</span>
<a name="l00830"></a>00830 <span class="preprocessor"></span>
<a name="l00831"></a>00831 <span class="keyword">class </span>RtApiDs: <span class="keyword">public</span> RtApi
<a name="l00832"></a>00832 {
<a name="l00833"></a>00833 <span class="keyword">public</span>:
<a name="l00834"></a>00834
<a name="l00835"></a>00835 RtApiDs();
<a name="l00836"></a>00836 ~RtApiDs();
<a name="l00837"></a>00837 <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d84928478830f42c2fd61e6c7ad498901931">RtAudio::WINDOWS_DS</a>; };
<a name="l00838"></a>00838 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00839"></a>00839 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultOutputDevice( <span class="keywordtype">void</span> );
<a name="l00840"></a>00840 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultInputDevice( <span class="keywordtype">void</span> );
<a name="l00841"></a>00841 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00842"></a>00842 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00843"></a>00843 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00844"></a>00844 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00845"></a>00845 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00846"></a>00846 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00847"></a>00847
<a name="l00848"></a>00848 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00849"></a>00849 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00850"></a>00850 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00851"></a>00851 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00852"></a>00852 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00853"></a>00853
<a name="l00854"></a>00854 <span class="keyword">private</span>:
<a name="l00855"></a>00855
<a name="l00856"></a>00856 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00857"></a>00857 <span class="keywordtype">bool</span> buffersRolling;
<a name="l00858"></a>00858 <span class="keywordtype">long</span> duplexPrerollBytes;
<a name="l00859"></a>00859 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00860"></a>00860 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00861"></a>00861 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00862"></a>00862 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00863"></a>00863 };
<a name="l00864"></a>00864
<a name="l00865"></a>00865 <span class="preprocessor">#endif</span>
<a name="l00866"></a>00866 <span class="preprocessor"></span>
<a name="l00867"></a>00867 <span class="preprocessor">#if defined(__LINUX_ALSA__)</span>
<a name="l00868"></a>00868 <span class="preprocessor"></span>
<a name="l00869"></a>00869 <span class="keyword">class </span>RtApiAlsa: <span class="keyword">public</span> RtApi
<a name="l00870"></a>00870 {
<a name="l00871"></a>00871 <span class="keyword">public</span>:
<a name="l00872"></a>00872
<a name="l00873"></a>00873 RtApiAlsa();
<a name="l00874"></a>00874 ~RtApiAlsa();
<a name="l00875"></a>00875 <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849a7a2ba095c2806caa893b6fb8fc3a1a8">RtAudio::LINUX_ALSA</a>; };
<a name="l00876"></a>00876 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00877"></a>00877 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00878"></a>00878 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00879"></a>00879 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00880"></a>00880 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00881"></a>00881 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00882"></a>00882
<a name="l00883"></a>00883 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00884"></a>00884 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00885"></a>00885 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00886"></a>00886 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00887"></a>00887 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00888"></a>00888
<a name="l00889"></a>00889 <span class="keyword">private</span>:
<a name="l00890"></a>00890
<a name="l00891"></a>00891 std::vector&lt;RtAudio::DeviceInfo&gt; devices_;
<a name="l00892"></a>00892 <span class="keywordtype">void</span> saveDeviceInfo( <span class="keywordtype">void</span> );
<a name="l00893"></a>00893 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00894"></a>00894 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00895"></a>00895 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00896"></a>00896 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00897"></a>00897 };
<a name="l00898"></a>00898
<a name="l00899"></a>00899 <span class="preprocessor">#endif</span>
<a name="l00900"></a>00900 <span class="preprocessor"></span>
<a name="l00901"></a>00901 <span class="preprocessor">#if defined(__LINUX_OSS__)</span>
<a name="l00902"></a>00902 <span class="preprocessor"></span>
<a name="l00903"></a>00903 <span class="keyword">class </span>RtApiOss: <span class="keyword">public</span> RtApi
<a name="l00904"></a>00904 {
<a name="l00905"></a>00905 <span class="keyword">public</span>:
<a name="l00906"></a>00906
<a name="l00907"></a>00907 RtApiOss();
<a name="l00908"></a>00908 ~RtApiOss();
<a name="l00909"></a>00909 <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d84939c84615e61de75e6a4e865596d62c82">RtAudio::LINUX_OSS</a>; };
<a name="l00910"></a>00910 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00911"></a>00911 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00912"></a>00912 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00913"></a>00913 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00914"></a>00914 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00915"></a>00915 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00916"></a>00916
<a name="l00917"></a>00917 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00918"></a>00918 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00919"></a>00919 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00920"></a>00920 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00921"></a>00921 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00922"></a>00922
<a name="l00923"></a>00923 <span class="keyword">private</span>:
<a name="l00924"></a>00924
<a name="l00925"></a>00925 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00926"></a>00926 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00927"></a>00927 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00928"></a>00928 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00929"></a>00929 };
<a name="l00930"></a>00930
<a name="l00931"></a>00931 <span class="preprocessor">#endif</span>
<a name="l00932"></a>00932 <span class="preprocessor"></span>
<a name="l00933"></a>00933 <span class="preprocessor">#if defined(__RTAUDIO_DUMMY__)</span>
<a name="l00934"></a>00934 <span class="preprocessor"></span>
<a name="l00935"></a>00935 <span class="keyword">class </span>RtApiDummy: <span class="keyword">public</span> RtApi
<a name="l00936"></a>00936 {
<a name="l00937"></a>00937 <span class="keyword">public</span>:
<a name="l00938"></a>00938
<a name="l00939"></a>00939 RtApiDummy() { errorText_ = <span class="stringliteral">"RtApiDummy: This class provides no functionality."</span>; error( <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac3a1603c24a56cbdaf5f8ae4ddcb86398">RtError::WARNING</a> ); };
<a name="l00940"></a>00940 <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#c9b6f625da88249d08a8409a9db0d849b06b8fd88bf18c9a2b8271f6961ae2d1">RtAudio::RTAUDIO_DUMMY</a>; };
<a name="l00941"></a>00941 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> 0; };
<a name="l00942"></a>00942 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> info; <span class="keywordflow">return</span> info; };
<a name="l00943"></a>00943 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> ) {};
<a name="l00944"></a>00944 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> ) {};
<a name="l00945"></a>00945 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> ) {};
<a name="l00946"></a>00946 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> ) {};
<a name="l00947"></a>00947
<a name="l00948"></a>00948 <span class="keyword">private</span>:
<a name="l00949"></a>00949
<a name="l00950"></a>00950 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00951"></a>00951 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00952"></a>00952 <a class="code" href="RtAudio_8h.html#afca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00953"></a>00953 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options ) { <span class="keywordflow">return</span> <span class="keyword">false</span>; };
<a name="l00954"></a>00954 };
<a name="l00955"></a>00955
<a name="l00956"></a>00956 <span class="preprocessor">#endif</span>
<a name="l00957"></a>00957 <span class="preprocessor"></span>
<a name="l00958"></a>00958 <span class="preprocessor">#endif</span>
<a name="l00959"></a>00959 <span class="preprocessor"></span>
<a name="l00960"></a>00960 <span class="comment">// Indentation settings for Vim and Emacs</span>
<a name="l00961"></a>00961 <span class="comment">//</span>
<a name="l00962"></a>00962 <span class="comment">// Local Variables:</span>
<a name="l00963"></a>00963 <span class="comment">// c-basic-offset: 2</span>
<a name="l00964"></a>00964 <span class="comment">// indent-tabs-mode: nil</span>
<a name="l00965"></a>00965 <span class="comment">// End:</span>
<a name="l00966"></a>00966 <span class="comment">//</span>
<a name="l00967"></a>00967 <span class="comment">// vim: et sts=2 sw=2</span>
</pre></div></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2009 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 148
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/RtAudio_8h.html View File

@@ -0,0 +1,148 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtAudio.h File Reference</h1><code>#include &lt;string&gt;</code><br/>
<code>#include &lt;vector&gt;</code><br/>
<code>#include &quot;RtError.h&quot;</code><br/>
<code>#include &lt;sstream&gt;</code><br/>

<p><a href="RtAudio_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html">RtAudio</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Realtime audio i/o C++ classes. <a href="classRtAudio.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The public device information structure for returning queried values. <a href="structRtAudio_1_1DeviceInfo.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The structure for specifying input or ouput stream parameters. <a href="structRtAudio_1_1StreamParameters.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The structure for specifying stream options. <a href="structRtAudio_1_1StreamOptions.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> data format type. <a href="#aafca92882d25915560018873221e44b8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudioStreamFlags</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> stream option flags. <a href="#a2c0f59b200dcec4d4e760f9166b29c41"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806">RtAudioStreamStatus</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> stream status (over- or underflow) flags. <a href="#a80e306d363583da3b0a1b65d9b57c806"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a> )(void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, <a class="el" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806">RtAudioStreamStatus</a> status, void *userData)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> callback function prototype. <a href="#a112c7b7e25a974977f6fc094cef1a31f"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="aafca92882d25915560018873221e44b8"></a><!-- doxytag: member="RtAudio.h::RtAudioFormat" ref="aafca92882d25915560018873221e44b8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef unsigned long <a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a></td>
</tr>
</table>
</div>
<div class="memdoc">

<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> data format type. </p>
<p>Support for signed integers and floats. Audio data fed to/from an <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> stream 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. Note that 24-bit data is expected to be encapsulated in a 32-bit format.</p>
<ul>
<li><em>RTAUDIO_SINT8:</em> 8-bit signed integer.</li>
<li><em>RTAUDIO_SINT16:</em> 16-bit signed integer.</li>
<li><em>RTAUDIO_SINT24:</em> Lower 3 bytes of 32-bit signed integer.</li>
<li><em>RTAUDIO_SINT32:</em> 32-bit signed integer.</li>
<li><em>RTAUDIO_FLOAT32:</em> Normalized between plus/minus 1.0.</li>
<li><em>RTAUDIO_FLOAT64:</em> Normalized between plus/minus 1.0. </li>
</ul>

</div>
</div>
<a class="anchor" id="a2c0f59b200dcec4d4e760f9166b29c41"></a><!-- doxytag: member="RtAudio.h::RtAudioStreamFlags" ref="a2c0f59b200dcec4d4e760f9166b29c41" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef unsigned long <a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudioStreamFlags</a></td>
</tr>
</table>
</div>
<div class="memdoc">

<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> stream option flags. </p>
<p>The following flags can be OR'ed together to allow a client to make changes to the default stream behavior:</p>
<ul>
<li><em>RTAUDIO_NONINTERLEAVED:</em> Use non-interleaved buffers (default = interleaved).</li>
<li><em>RTAUDIO_MINIMIZE_LATENCY:</em> Attempt to set stream parameters for lowest possible latency.</li>
<li><em>RTAUDIO_HOG_DEVICE:</em> Attempt grab device for exclusive use.</li>
<li><em>RTAUDIO_ALSA_USE_DEFAULT:</em> Use the "default" PCM device (ALSA only).</li>
</ul>
<p>By default, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> streams pass and receive audio data from the client in an interleaved format. By passing the RTAUDIO_NONINTERLEAVED flag to the openStream() function, audio data will instead be presented in non-interleaved buffers. In this case, each buffer argument in the RtAudioCallback function will point to a single array of data, with <code>nFrames</code> samples for each channel concatenated back-to-back. For example, the first sample of data for the second channel would be located at index <code>nFrames</code> (assuming the <code>buffer</code> pointer was recast to the correct data type for the stream).</p>
<p>Certain audio APIs offer a number of parameters that influence the I/O latency of a stream. By default, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to set these parameters internally for robust (glitch-free) performance (though some APIs, like Windows Direct Sound, make this difficult). By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream() function, internal stream settings will be influenced in an attempt to minimize stream latency, though possibly at the expense of stream performance.</p>
<p>If the RTAUDIO_HOG_DEVICE flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to open the input and/or output stream device(s) for exclusive use. Note that this is not possible with all supported audio APIs.</p>
<p>If the RTAUDIO_SCHEDULE_REALTIME flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to select realtime scheduling (round-robin) for the callback thread.</p>
<p>If the RTAUDIO_ALSA_USE_DEFAULT flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to open the "default" PCM device when using the ALSA API. Note that this will override any specified input or output device id. </p>

</div>
</div>
<a class="anchor" id="a80e306d363583da3b0a1b65d9b57c806"></a><!-- doxytag: member="RtAudio.h::RtAudioStreamStatus" ref="a80e306d363583da3b0a1b65d9b57c806" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef unsigned long <a class="el" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806">RtAudioStreamStatus</a></td>
</tr>
</table>
</div>
<div class="memdoc">

<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> stream status (over- or underflow) flags. </p>
<p>Notification of a stream over- or underflow is indicated by a non-zero stream <code>status</code> argument in the RtAudioCallback function. The stream status can be one of the following two options, depending on whether the stream is open for output and/or input:</p>
<ul>
<li><em>RTAUDIO_INPUT_OVERFLOW:</em> Input data was discarded because of an overflow condition at the driver.</li>
<li><em>RTAUDIO_OUTPUT_UNDERFLOW:</em> The output buffer ran low, likely producing a break in the output sound. </li>
</ul>

</div>
</div>
<a class="anchor" id="a112c7b7e25a974977f6fc094cef1a31f"></a><!-- doxytag: member="RtAudio.h::RtAudioCallback" ref="a112c7b7e25a974977f6fc094cef1a31f" args=")(void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, RtAudioStreamStatus status, void *userData)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int(* <a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a>)(void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, <a class="el" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806">RtAudioStreamStatus</a> status, void *userData)</td>
</tr>
</table>
</div>
<div class="memdoc">

<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> callback function prototype. </p>
<p>All <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> clients must create a function of type RtAudioCallback to read and/or write data from/to the audio stream. When the underlying audio system is ready for new input or output data, this function will be invoked.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>outputBuffer</em>&nbsp;</td><td>For output (or duplex) streams, the client should write <code>nFrames</code> of audio sample frames into this buffer. This argument should be recast to the datatype specified when the stream was opened. For input-only streams, this argument will be NULL.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>inputBuffer</em>&nbsp;</td><td>For input (or duplex) streams, this buffer will hold <code>nFrames</code> of input audio sample frames. This argument should be recast to the datatype specified when the stream was opened. For output-only streams, this argument will be NULL.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>nFrames</em>&nbsp;</td><td>The number of sample frames of input or output data in the buffers. The actual buffer size in bytes is dependent on the data type and number of channels in use.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>streamTime</em>&nbsp;</td><td>The number of seconds that have elapsed since the stream was started.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>If non-zero, this argument indicates a data overflow or underflow condition for the stream. The particular condition can be determined by comparison with the RtAudioStreamStatus flags.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>userData</em>&nbsp;</td><td>A pointer to optional data provided by the client when opening the stream (default = NULL).</td></tr>
</table>
</dd>
</dl>
<p>To continue normal stream operation, the RtAudioCallback function should return a value of zero. To stop the stream and drain the output buffer, the function should return a value of one. To abort the stream immediately, the client should return a value of two. </p>

</div>
</div>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 677
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/RtAudio_8h_source.html View File

@@ -0,0 +1,677 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<h1>RtAudio.h</h1><a href="RtAudio_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/************************************************************************/</span>
<a name="l00039"></a>00039 <span class="comment">/************************************************************************/</span>
<a name="l00040"></a>00040
<a name="l00045"></a>00045 <span class="comment">// RtAudio: Version 4.0.11</span>
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="preprocessor">#ifndef __RTAUDIO_H</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define __RTAUDIO_H</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00052"></a>00052 <span class="preprocessor">#include &quot;RtError.h&quot;</span>
<a name="l00053"></a>00053
<a name="l00072"></a><a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">00072</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a>;
<a name="l00073"></a>00073 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT8 = 0x1; <span class="comment">// 8-bit signed integer.</span>
<a name="l00074"></a>00074 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT16 = 0x2; <span class="comment">// 16-bit signed integer.</span>
<a name="l00075"></a>00075 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT24 = 0x4; <span class="comment">// Lower 3 bytes of 32-bit signed integer.</span>
<a name="l00076"></a>00076 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_SINT32 = 0x8; <span class="comment">// 32-bit signed integer.</span>
<a name="l00077"></a>00077 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_FLOAT32 = 0x10; <span class="comment">// Normalized between plus/minus 1.0.</span>
<a name="l00078"></a>00078 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> RTAUDIO_FLOAT64 = 0x20; <span class="comment">// Normalized between plus/minus 1.0.</span>
<a name="l00079"></a>00079
<a name="l00122"></a><a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">00122</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a>;
<a name="l00123"></a>00123 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_NONINTERLEAVED = 0x1; <span class="comment">// Use non-interleaved buffers (default = interleaved).</span>
<a name="l00124"></a>00124 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_MINIMIZE_LATENCY = 0x2; <span class="comment">// Attempt to set stream parameters for lowest possible latency.</span>
<a name="l00125"></a>00125 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_HOG_DEVICE = 0x4; <span class="comment">// Attempt grab device and prevent use by others.</span>
<a name="l00126"></a>00126 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_SCHEDULE_REALTIME = 0x8; <span class="comment">// Try to select realtime scheduling for callback thread.</span>
<a name="l00127"></a>00127 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> RTAUDIO_ALSA_USE_DEFAULT = 0x10; <span class="comment">// Use the &quot;default&quot; PCM device (ALSA only).</span>
<a name="l00128"></a>00128
<a name="l00140"></a><a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806">00140</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a>;
<a name="l00141"></a>00141 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> RTAUDIO_INPUT_OVERFLOW = 0x1; <span class="comment">// Input data was discarded because of an overflow condition at the driver.</span>
<a name="l00142"></a>00142 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> RTAUDIO_OUTPUT_UNDERFLOW = 0x2; <span class="comment">// The output buffer ran low, likely causing a gap in the output sound.</span>
<a name="l00143"></a>00143
<a name="l00145"></a>00145
<a name="l00183"></a><a class="code" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">00183</a> <span class="keyword">typedef</span> int (*<a class="code" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f" title="RtAudio callback function prototype.">RtAudioCallback</a>)( <span class="keywordtype">void</span> *outputBuffer, <span class="keywordtype">void</span> *inputBuffer,
<a name="l00184"></a>00184 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames,
<a name="l00185"></a>00185 <span class="keywordtype">double</span> streamTime,
<a name="l00186"></a>00186 <a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> status,
<a name="l00187"></a>00187 <span class="keywordtype">void</span> *userData );
<a name="l00188"></a>00188
<a name="l00189"></a>00189
<a name="l00190"></a>00190 <span class="comment">// **************************************************************** //</span>
<a name="l00191"></a>00191 <span class="comment">//</span>
<a name="l00192"></a>00192 <span class="comment">// RtAudio class declaration.</span>
<a name="l00193"></a>00193 <span class="comment">//</span>
<a name="l00194"></a>00194 <span class="comment">// RtAudio is a &quot;controller&quot; used to select an available audio i/o</span>
<a name="l00195"></a>00195 <span class="comment">// interface. It presents a common API for the user to call but all</span>
<a name="l00196"></a>00196 <span class="comment">// functionality is implemented by the class RtApi and its</span>
<a name="l00197"></a>00197 <span class="comment">// subclasses. RtAudio creates an instance of an RtApi subclass</span>
<a name="l00198"></a>00198 <span class="comment">// based on the user&#39;s API choice. If no choice is made, RtAudio</span>
<a name="l00199"></a>00199 <span class="comment">// attempts to make a &quot;logical&quot; API selection.</span>
<a name="l00200"></a>00200 <span class="comment">//</span>
<a name="l00201"></a>00201 <span class="comment">// **************************************************************** //</span>
<a name="l00202"></a>00202
<a name="l00203"></a>00203 <span class="keyword">class </span>RtApi;
<a name="l00204"></a>00204
<a name="l00205"></a><a class="code" href="classRtAudio.html">00205</a> <span class="keyword">class </span><a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>
<a name="l00206"></a>00206 {
<a name="l00207"></a>00207 <span class="keyword">public</span>:
<a name="l00208"></a>00208
<a name="l00210"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">00210</a> <span class="keyword">enum</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">Api</a> {
<a name="l00211"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">00211</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a>,
<a name="l00212"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">00212</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">LINUX_ALSA</a>,
<a name="l00213"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">00213</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">LINUX_PULSE</a>,
<a name="l00214"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">00214</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">LINUX_OSS</a>,
<a name="l00215"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">00215</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">UNIX_JACK</a>,
<a name="l00216"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">00216</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">MACOSX_CORE</a>,
<a name="l00217"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">00217</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">WINDOWS_ASIO</a>,
<a name="l00218"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">00218</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">WINDOWS_DS</a>,
<a name="l00219"></a><a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">00219</a> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RTAUDIO_DUMMY</a>
<a name="l00220"></a>00220 };
<a name="l00221"></a>00221
<a name="l00223"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html">00223</a> <span class="keyword">struct </span><a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">DeviceInfo</a> {
<a name="l00224"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">00224</a> <span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">probed</a>;
<a name="l00225"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">00225</a> std::string <a class="code" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">name</a>;
<a name="l00226"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">00226</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">outputChannels</a>;
<a name="l00227"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">00227</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">inputChannels</a>;
<a name="l00228"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">00228</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">duplexChannels</a>;
<a name="l00229"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">00229</a> <span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">isDefaultOutput</a>;
<a name="l00230"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">00230</a> <span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">isDefaultInput</a>;
<a name="l00231"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">00231</a> std::vector&lt;unsigned int&gt; <a class="code" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">sampleRates</a>;
<a name="l00232"></a><a class="code" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">00232</a> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">nativeFormats</a>;
<a name="l00234"></a>00234 <span class="comment">// Default constructor.</span>
<a name="l00235"></a>00235 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">DeviceInfo</a>()
<a name="l00236"></a>00236 :<a class="code" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">probed</a>(false), <a class="code" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">outputChannels</a>(0), <a class="code" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">inputChannels</a>(0), <a class="code" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">duplexChannels</a>(0),
<a name="l00237"></a>00237 <a class="code" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">isDefaultOutput</a>(false), <a class="code" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">isDefaultInput</a>(false), <a class="code" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">nativeFormats</a>(0) {}
<a name="l00238"></a>00238 };
<a name="l00239"></a>00239
<a name="l00241"></a><a class="code" href="structRtAudio_1_1StreamParameters.html">00241</a> <span class="keyword">struct </span><a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">StreamParameters</a> {
<a name="l00242"></a><a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">00242</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a>;
<a name="l00243"></a><a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">00243</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a>;
<a name="l00244"></a><a class="code" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">00244</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">firstChannel</a>;
<a name="l00246"></a>00246 <span class="comment">// Default constructor.</span>
<a name="l00247"></a>00247 <a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">StreamParameters</a>()
<a name="l00248"></a>00248 : <a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a>(0), <a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a>(0), <a class="code" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">firstChannel</a>(0) {}
<a name="l00249"></a>00249 };
<a name="l00250"></a>00250
<a name="l00252"></a>00252
<a name="l00308"></a><a class="code" href="structRtAudio_1_1StreamOptions.html">00308</a> <span class="keyword">struct </span><a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">StreamOptions</a> {
<a name="l00309"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">00309</a> <a class="code" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41" title="RtAudio stream option flags.">RtAudioStreamFlags</a> <a class="code" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">flags</a>;
<a name="l00310"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">00310</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">numberOfBuffers</a>;
<a name="l00311"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">00311</a> std::string <a class="code" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">streamName</a>;
<a name="l00312"></a><a class="code" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">00312</a> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">priority</a>;
<a name="l00314"></a>00314 <span class="comment">// Default constructor.</span>
<a name="l00315"></a>00315 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">StreamOptions</a>()
<a name="l00316"></a>00316 : <a class="code" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">flags</a>(0), <a class="code" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">numberOfBuffers</a>(0), <a class="code" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">priority</a>(0) {}
<a name="l00317"></a>00317 };
<a name="l00318"></a>00318
<a name="l00320"></a>00320
<a name="l00325"></a>00325 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26" title="A static function to determine the available compiled audio APIs.">getCompiledApi</a>( std::vector&lt;RtAudio::Api&gt; &amp;apis ) <span class="keywordflow">throw</span>();
<a name="l00326"></a>00326
<a name="l00328"></a>00328
<a name="l00336"></a>00336 <a class="code" href="classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9" title="The class constructor.">RtAudio</a>( <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> api=<a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a> ) throw();
<a name="l00337"></a>00337
<a name="l00339"></a>00339
<a name="l00343"></a>00343 ~<a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>() throw();
<a name="l00344"></a>00344
<a name="l00346"></a>00346 <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::<a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">Api</a> <a class="code" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246" title="Returns the audio API specifier for the current instance of RtAudio.">getCurrentApi</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00347"></a>00347
<a name="l00349"></a>00349
<a name="l00354"></a>00354 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00355"></a>00355
<a name="l00357"></a>00357
<a name="l00367"></a>00367 <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::DeviceInfo <a class="code" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00368"></a>00368
<a name="l00370"></a>00370
<a name="l00377"></a>00377 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">getDefaultOutputDevice</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00378"></a>00378
<a name="l00380"></a>00380
<a name="l00387"></a>00387 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce" title="A function that returns the index of the default input device.">getDefaultInputDevice</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00388"></a>00388
<a name="l00390"></a>00390
<a name="l00427"></a>00427 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::StreamParameters *outputParameters,
<a name="l00428"></a>00428 <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::StreamParameters *inputParameters,
<a name="l00429"></a>00429 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00430"></a>00430 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferFrames, <a class="code" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f" title="RtAudio callback function prototype.">RtAudioCallback</a> callback,
<a name="l00431"></a>00431 <span class="keywordtype">void</span> *userData = NULL, <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::StreamOptions *options = NULL );
<a name="l00432"></a>00432
<a name="l00434"></a>00434
<a name="l00438"></a>00438 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">closeStream</a>( <span class="keywordtype">void</span> ) throw();
<a name="l00439"></a>00439
<a name="l00441"></a>00441
<a name="l00447"></a>00447 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">startStream</a>( <span class="keywordtype">void</span> );
<a name="l00448"></a>00448
<a name="l00450"></a>00450
<a name="l00456"></a>00456 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">stopStream</a>( <span class="keywordtype">void</span> );
<a name="l00457"></a>00457
<a name="l00459"></a>00459
<a name="l00465"></a>00465 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f" title="Stop a stream, discarding any samples remaining in the input/output queue.">abortStream</a>( <span class="keywordtype">void</span> );
<a name="l00466"></a>00466
<a name="l00468"></a>00468 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">isStreamOpen</a>( <span class="keywordtype">void</span> ) const throw();
<a name="l00469"></a>00469
<a name="l00471"></a>00471 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea" title="Returns true if the stream is running and false if it is stopped or not open.">isStreamRunning</a>( <span class="keywordtype">void</span> ) const throw();
<a name="l00472"></a>00472
<a name="l00474"></a>00474
<a name="l00477"></a>00477 <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca" title="Returns the number of elapsed seconds since the stream was started.">getStreamTime</a>( <span class="keywordtype">void</span> );
<a name="l00478"></a>00478
<a name="l00480"></a>00480
<a name="l00488"></a>00488 <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3" title="Returns the internal stream latency in sample frames.">getStreamLatency</a>( <span class="keywordtype">void</span> );
<a name="l00489"></a>00489
<a name="l00491"></a>00491
<a name="l00496"></a>00496 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5" title="Returns actual sample rate in use by the stream.">getStreamSampleRate</a>( <span class="keywordtype">void</span> );
<a name="l00497"></a>00497
<a name="l00499"></a>00499 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">showWarnings</a>( <span class="keywordtype">bool</span> value = true ) throw();
<a name="l00500"></a>00500
<a name="l00501"></a>00501 protected:
<a name="l00502"></a>00502
<a name="l00503"></a>00503 <span class="keywordtype">void</span> openRtApi( <a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>::<a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">Api</a> api );
<a name="l00504"></a>00504 RtApi *rtapi_;
<a name="l00505"></a>00505 };
<a name="l00506"></a>00506
<a name="l00507"></a>00507 <span class="comment">// Operating system dependent thread functionality.</span>
<a name="l00508"></a>00508 <span class="preprocessor">#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)</span>
<a name="l00509"></a>00509 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;windows.h&gt;</span>
<a name="l00510"></a>00510 <span class="preprocessor"> #include &lt;process.h&gt;</span>
<a name="l00511"></a>00511
<a name="l00512"></a>00512 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ThreadHandle;
<a name="l00513"></a>00513 <span class="keyword">typedef</span> CRITICAL_SECTION StreamMutex;
<a name="l00514"></a>00514
<a name="l00515"></a>00515 <span class="preprocessor">#elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__)</span>
<a name="l00516"></a>00516 <span class="preprocessor"></span> <span class="comment">// Using pthread library for various flavors of unix.</span>
<a name="l00517"></a>00517 <span class="preprocessor"> #include &lt;pthread.h&gt;</span>
<a name="l00518"></a>00518
<a name="l00519"></a>00519 <span class="keyword">typedef</span> pthread_t ThreadHandle;
<a name="l00520"></a>00520 <span class="keyword">typedef</span> pthread_mutex_t StreamMutex;
<a name="l00521"></a>00521
<a name="l00522"></a>00522 <span class="preprocessor">#else // Setup for &quot;dummy&quot; behavior</span>
<a name="l00523"></a>00523 <span class="preprocessor"></span>
<a name="l00524"></a>00524 <span class="preprocessor"> #define __RTAUDIO_DUMMY__</span>
<a name="l00525"></a>00525 <span class="preprocessor"></span> <span class="keyword">typedef</span> <span class="keywordtype">int</span> ThreadHandle;
<a name="l00526"></a>00526 <span class="keyword">typedef</span> <span class="keywordtype">int</span> StreamMutex;
<a name="l00527"></a>00527
<a name="l00528"></a>00528 <span class="preprocessor">#endif</span>
<a name="l00529"></a>00529 <span class="preprocessor"></span>
<a name="l00530"></a>00530 <span class="comment">// This global structure type is used to pass callback information</span>
<a name="l00531"></a>00531 <span class="comment">// between the private RtAudio stream structure and global callback</span>
<a name="l00532"></a>00532 <span class="comment">// handling functions.</span>
<a name="l00533"></a>00533 <span class="keyword">struct </span>CallbackInfo {
<a name="l00534"></a>00534 <span class="keywordtype">void</span> *object; <span class="comment">// Used as a &quot;this&quot; pointer.</span>
<a name="l00535"></a>00535 ThreadHandle thread;
<a name="l00536"></a>00536 <span class="keywordtype">void</span> *callback;
<a name="l00537"></a>00537 <span class="keywordtype">void</span> *userData;
<a name="l00538"></a>00538 <span class="keywordtype">void</span> *apiInfo; <span class="comment">// void pointer for API specific callback information</span>
<a name="l00539"></a>00539 <span class="keywordtype">bool</span> isRunning;
<a name="l00540"></a>00540
<a name="l00541"></a>00541 <span class="comment">// Default constructor.</span>
<a name="l00542"></a>00542 CallbackInfo()
<a name="l00543"></a>00543 :object(0), callback(0), userData(0), apiInfo(0), isRunning(false) {}
<a name="l00544"></a>00544 };
<a name="l00545"></a>00545
<a name="l00546"></a>00546 <span class="comment">// **************************************************************** //</span>
<a name="l00547"></a>00547 <span class="comment">//</span>
<a name="l00548"></a>00548 <span class="comment">// RtApi class declaration.</span>
<a name="l00549"></a>00549 <span class="comment">//</span>
<a name="l00550"></a>00550 <span class="comment">// Subclasses of RtApi contain all API- and OS-specific code necessary</span>
<a name="l00551"></a>00551 <span class="comment">// to fully implement the RtAudio API.</span>
<a name="l00552"></a>00552 <span class="comment">//</span>
<a name="l00553"></a>00553 <span class="comment">// Note that RtApi is an abstract base class and cannot be</span>
<a name="l00554"></a>00554 <span class="comment">// explicitly instantiated. The class RtAudio will create an</span>
<a name="l00555"></a>00555 <span class="comment">// instance of an RtApi subclass (RtApiOss, RtApiAlsa,</span>
<a name="l00556"></a>00556 <span class="comment">// RtApiJack, RtApiCore, RtApiDs, or RtApiAsio).</span>
<a name="l00557"></a>00557 <span class="comment">//</span>
<a name="l00558"></a>00558 <span class="comment">// **************************************************************** //</span>
<a name="l00559"></a>00559
<a name="l00560"></a>00560 <span class="preprocessor">#if defined( HAVE_GETTIMEOFDAY )</span>
<a name="l00561"></a>00561 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;sys/time.h&gt;</span>
<a name="l00562"></a>00562 <span class="preprocessor">#endif</span>
<a name="l00563"></a>00563 <span class="preprocessor"></span>
<a name="l00564"></a>00564 <span class="preprocessor">#include &lt;sstream&gt;</span>
<a name="l00565"></a>00565
<a name="l00566"></a>00566 <span class="keyword">class </span>RtApi
<a name="l00567"></a>00567 {
<a name="l00568"></a>00568 <span class="keyword">public</span>:
<a name="l00569"></a>00569
<a name="l00570"></a>00570 RtApi();
<a name="l00571"></a>00571 <span class="keyword">virtual</span> ~RtApi();
<a name="l00572"></a>00572 <span class="keyword">virtual</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> <a class="code" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246" title="Returns the audio API specifier for the current instance of RtAudio.">getCurrentApi</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00573"></a>00573 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00574"></a>00574 <span class="keyword">virtual</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> <a class="code" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) = 0;
<a name="l00575"></a>00575 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce" title="A function that returns the index of the default input device.">getDefaultInputDevice</a>( <span class="keywordtype">void</span> );
<a name="l00576"></a>00576 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">getDefaultOutputDevice</a>( <span class="keywordtype">void</span> );
<a name="l00577"></a>00577 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( <a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> *outputParameters,
<a name="l00578"></a>00578 <a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> *inputParameters,
<a name="l00579"></a>00579 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00580"></a>00580 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferFrames, <a class="code" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f" title="RtAudio callback function prototype.">RtAudioCallback</a> callback,
<a name="l00581"></a>00581 <span class="keywordtype">void</span> *userData, <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00582"></a>00582 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">closeStream</a>( <span class="keywordtype">void</span> );
<a name="l00583"></a>00583 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">startStream</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00584"></a>00584 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">stopStream</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00585"></a>00585 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f" title="Stop a stream, discarding any samples remaining in the input/output queue.">abortStream</a>( <span class="keywordtype">void</span> ) = 0;
<a name="l00586"></a>00586 <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3" title="Returns the internal stream latency in sample frames.">getStreamLatency</a>( <span class="keywordtype">void</span> );
<a name="l00587"></a>00587 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5" title="Returns actual sample rate in use by the stream.">getStreamSampleRate</a>( <span class="keywordtype">void</span> );
<a name="l00588"></a>00588 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca" title="Returns the number of elapsed seconds since the stream was started.">getStreamTime</a>( <span class="keywordtype">void</span> );
<a name="l00589"></a>00589 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">isStreamOpen</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> stream_.state != STREAM_CLOSED; };
<a name="l00590"></a>00590 <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea" title="Returns true if the stream is running and false if it is stopped or not open.">isStreamRunning</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> stream_.state == STREAM_RUNNING; };
<a name="l00591"></a>00591 <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">showWarnings</a>( <span class="keywordtype">bool</span> value ) { showWarnings_ = value; };
<a name="l00592"></a>00592
<a name="l00593"></a>00593
<a name="l00594"></a>00594 <span class="keyword">protected</span>:
<a name="l00595"></a>00595
<a name="l00596"></a>00596 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MAX_SAMPLE_RATES;
<a name="l00597"></a>00597 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SAMPLE_RATES[];
<a name="l00598"></a>00598
<a name="l00599"></a>00599 <span class="keyword">enum</span> { FAILURE, SUCCESS };
<a name="l00600"></a>00600
<a name="l00601"></a>00601 <span class="keyword">enum</span> StreamState {
<a name="l00602"></a>00602 STREAM_STOPPED,
<a name="l00603"></a>00603 STREAM_STOPPING,
<a name="l00604"></a>00604 STREAM_RUNNING,
<a name="l00605"></a>00605 STREAM_CLOSED = -50
<a name="l00606"></a>00606 };
<a name="l00607"></a>00607
<a name="l00608"></a>00608 <span class="keyword">enum</span> StreamMode {
<a name="l00609"></a>00609 OUTPUT,
<a name="l00610"></a>00610 INPUT,
<a name="l00611"></a>00611 DUPLEX,
<a name="l00612"></a>00612 UNINITIALIZED = -75
<a name="l00613"></a>00613 };
<a name="l00614"></a>00614
<a name="l00615"></a>00615 <span class="comment">// A protected structure used for buffer conversion.</span>
<a name="l00616"></a>00616 <span class="keyword">struct </span>ConvertInfo {
<a name="l00617"></a>00617 <span class="keywordtype">int</span> channels;
<a name="l00618"></a>00618 <span class="keywordtype">int</span> inJump, outJump;
<a name="l00619"></a>00619 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> inFormat, outFormat;
<a name="l00620"></a>00620 std::vector&lt;int&gt; inOffset;
<a name="l00621"></a>00621 std::vector&lt;int&gt; outOffset;
<a name="l00622"></a>00622 };
<a name="l00623"></a>00623
<a name="l00624"></a>00624 <span class="comment">// A protected structure for audio streams.</span>
<a name="l00625"></a>00625 <span class="keyword">struct </span>RtApiStream {
<a name="l00626"></a>00626 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00627"></a>00627 <span class="keywordtype">void</span> *apiHandle; <span class="comment">// void pointer for API specific stream handle information</span>
<a name="l00628"></a>00628 StreamMode mode; <span class="comment">// OUTPUT, INPUT, or DUPLEX.</span>
<a name="l00629"></a>00629 StreamState state; <span class="comment">// STOPPED, RUNNING, or CLOSED</span>
<a name="l00630"></a>00630 <span class="keywordtype">char</span> *userBuffer[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00631"></a>00631 <span class="keywordtype">char</span> *deviceBuffer;
<a name="l00632"></a>00632 <span class="keywordtype">bool</span> doConvertBuffer[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00633"></a>00633 <span class="keywordtype">bool</span> userInterleaved;
<a name="l00634"></a>00634 <span class="keywordtype">bool</span> deviceInterleaved[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00635"></a>00635 <span class="keywordtype">bool</span> doByteSwap[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00636"></a>00636 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate;
<a name="l00637"></a>00637 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferSize;
<a name="l00638"></a>00638 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nBuffers;
<a name="l00639"></a>00639 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nUserChannels[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00640"></a>00640 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nDeviceChannels[2]; <span class="comment">// Playback and record channels, respectively.</span>
<a name="l00641"></a>00641 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channelOffset[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00642"></a>00642 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> latency[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00643"></a>00643 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> userFormat;
<a name="l00644"></a>00644 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> deviceFormat[2]; <span class="comment">// Playback and record, respectively.</span>
<a name="l00645"></a>00645 StreamMutex mutex;
<a name="l00646"></a>00646 CallbackInfo callbackInfo;
<a name="l00647"></a>00647 ConvertInfo convertInfo[2];
<a name="l00648"></a>00648 <span class="keywordtype">double</span> streamTime; <span class="comment">// Number of elapsed seconds since the stream started.</span>
<a name="l00649"></a>00649
<a name="l00650"></a>00650 <span class="preprocessor">#if defined(HAVE_GETTIMEOFDAY)</span>
<a name="l00651"></a>00651 <span class="preprocessor"></span> <span class="keyword">struct </span>timeval lastTickTimestamp;
<a name="l00652"></a>00652 <span class="preprocessor">#endif</span>
<a name="l00653"></a>00653 <span class="preprocessor"></span>
<a name="l00654"></a>00654 RtApiStream()
<a name="l00655"></a>00655 :apiHandle(0), deviceBuffer(0) { device[0] = 11111; device[1] = 11111; }
<a name="l00656"></a>00656 };
<a name="l00657"></a>00657
<a name="l00658"></a>00658 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> Int16;
<a name="l00659"></a>00659 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> Int32;
<a name="l00660"></a>00660 <span class="keyword">typedef</span> <span class="keywordtype">float</span> Float32;
<a name="l00661"></a>00661 <span class="keyword">typedef</span> <span class="keywordtype">double</span> Float64;
<a name="l00662"></a>00662
<a name="l00663"></a>00663 std::ostringstream errorStream_;
<a name="l00664"></a>00664 std::string errorText_;
<a name="l00665"></a>00665 <span class="keywordtype">bool</span> showWarnings_;
<a name="l00666"></a>00666 RtApiStream stream_;
<a name="l00667"></a>00667
<a name="l00675"></a>00675 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00676"></a>00676 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00677"></a>00677 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00678"></a>00678 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00679"></a>00679
<a name="l00681"></a>00681 <span class="keywordtype">void</span> tickStreamTime( <span class="keywordtype">void</span> );
<a name="l00682"></a>00682
<a name="l00684"></a>00684 <span class="keywordtype">void</span> clearStreamInfo();
<a name="l00685"></a>00685
<a name="l00690"></a>00690 <span class="keywordtype">void</span> verifyStream( <span class="keywordtype">void</span> );
<a name="l00691"></a>00691
<a name="l00693"></a>00693 <span class="keywordtype">void</span> error( <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">RtError::Type</a> type );
<a name="l00694"></a>00694
<a name="l00699"></a>00699 <span class="keywordtype">void</span> convertBuffer( <span class="keywordtype">char</span> *outBuffer, <span class="keywordtype">char</span> *inBuffer, ConvertInfo &amp;info );
<a name="l00700"></a>00700
<a name="l00702"></a>00702 <span class="keywordtype">void</span> byteSwapBuffer( <span class="keywordtype">char</span> *buffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> samples, <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format );
<a name="l00703"></a>00703
<a name="l00705"></a>00705 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> formatBytes( <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format );
<a name="l00706"></a>00706
<a name="l00708"></a>00708 <span class="keywordtype">void</span> setConvertInfo( StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel );
<a name="l00709"></a>00709 };
<a name="l00710"></a>00710
<a name="l00711"></a>00711 <span class="comment">// **************************************************************** //</span>
<a name="l00712"></a>00712 <span class="comment">//</span>
<a name="l00713"></a>00713 <span class="comment">// Inline RtAudio definitions.</span>
<a name="l00714"></a>00714 <span class="comment">//</span>
<a name="l00715"></a>00715 <span class="comment">// **************************************************************** //</span>
<a name="l00716"></a>00716
<a name="l00717"></a><a class="code" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246">00717</a> <span class="keyword">inline</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> <a class="code" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246" title="Returns the audio API specifier for the current instance of RtAudio.">RtAudio :: getCurrentApi</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getCurrentApi(); }
<a name="l00718"></a><a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a">00718</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">RtAudio :: getDeviceCount</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceCount(); }
<a name="l00719"></a><a class="code" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8">00719</a> <span class="keyword">inline</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> <a class="code" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">RtAudio :: getDeviceInfo</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <span class="keywordflow">return</span> rtapi_-&gt;getDeviceInfo( device ); }
<a name="l00720"></a><a class="code" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce">00720</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce" title="A function that returns the index of the default input device.">RtAudio :: getDefaultInputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultInputDevice(); }
<a name="l00721"></a><a class="code" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc">00721</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">RtAudio :: getDefaultOutputDevice</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getDefaultOutputDevice(); }
<a name="l00722"></a><a class="code" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a">00722</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">RtAudio :: closeStream</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;closeStream(); }
<a name="l00723"></a><a class="code" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80">00723</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">RtAudio :: startStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;startStream(); }
<a name="l00724"></a><a class="code" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd">00724</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">RtAudio :: stopStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;stopStream(); }
<a name="l00725"></a><a class="code" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f">00725</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f" title="Stop a stream, discarding any samples remaining in the input/output queue.">RtAudio :: abortStream</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;abortStream(); }
<a name="l00726"></a><a class="code" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f">00726</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">RtAudio :: isStreamOpen</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamOpen(); }
<a name="l00727"></a><a class="code" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea">00727</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea" title="Returns true if the stream is running and false if it is stopped or not open.">RtAudio :: isStreamRunning</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> rtapi_-&gt;isStreamRunning(); }
<a name="l00728"></a><a class="code" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3">00728</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3" title="Returns the internal stream latency in sample frames.">RtAudio :: getStreamLatency</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamLatency(); }
<a name="l00729"></a><a class="code" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5">00729</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5" title="Returns actual sample rate in use by the stream.">RtAudio :: getStreamSampleRate</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamSampleRate(); };
<a name="l00730"></a><a class="code" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca">00730</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca" title="Returns the number of elapsed seconds since the stream was started.">RtAudio :: getStreamTime</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getStreamTime(); }
<a name="l00731"></a><a class="code" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77">00731</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">RtAudio :: showWarnings</a>( <span class="keywordtype">bool</span> value ) <span class="keywordflow">throw</span>() { rtapi_-&gt;showWarnings( value ); }
<a name="l00732"></a>00732
<a name="l00733"></a>00733 <span class="comment">// RtApi Subclass prototypes.</span>
<a name="l00734"></a>00734
<a name="l00735"></a>00735 <span class="preprocessor">#if defined(__MACOSX_CORE__)</span>
<a name="l00736"></a>00736 <span class="preprocessor"></span>
<a name="l00737"></a>00737 <span class="preprocessor">#include &lt;CoreAudio/AudioHardware.h&gt;</span>
<a name="l00738"></a>00738
<a name="l00739"></a>00739 <span class="keyword">class </span>RtApiCore: <span class="keyword">public</span> RtApi
<a name="l00740"></a>00740 {
<a name="l00741"></a>00741 <span class="keyword">public</span>:
<a name="l00742"></a>00742
<a name="l00743"></a>00743 RtApiCore();
<a name="l00744"></a>00744 ~RtApiCore();
<a name="l00745"></a>00745 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">RtAudio::MACOSX_CORE</a>; };
<a name="l00746"></a>00746 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00747"></a>00747 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00748"></a>00748 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultOutputDevice( <span class="keywordtype">void</span> );
<a name="l00749"></a>00749 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultInputDevice( <span class="keywordtype">void</span> );
<a name="l00750"></a>00750 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00751"></a>00751 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00752"></a>00752 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00753"></a>00753 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00754"></a>00754 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00755"></a>00755
<a name="l00756"></a>00756 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00757"></a>00757 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00758"></a>00758 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00759"></a>00759 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00760"></a>00760 <span class="keywordtype">bool</span> callbackEvent( AudioDeviceID deviceId,
<a name="l00761"></a>00761 <span class="keyword">const</span> AudioBufferList *inBufferList,
<a name="l00762"></a>00762 <span class="keyword">const</span> AudioBufferList *outBufferList );
<a name="l00763"></a>00763
<a name="l00764"></a>00764 <span class="keyword">private</span>:
<a name="l00765"></a>00765
<a name="l00766"></a>00766 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00767"></a>00767 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00768"></a>00768 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00769"></a>00769 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00770"></a>00770 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* getErrorCode( OSStatus code );
<a name="l00771"></a>00771 };
<a name="l00772"></a>00772
<a name="l00773"></a>00773 <span class="preprocessor">#endif</span>
<a name="l00774"></a>00774 <span class="preprocessor"></span>
<a name="l00775"></a>00775 <span class="preprocessor">#if defined(__UNIX_JACK__)</span>
<a name="l00776"></a>00776 <span class="preprocessor"></span>
<a name="l00777"></a>00777 <span class="keyword">class </span>RtApiJack: <span class="keyword">public</span> RtApi
<a name="l00778"></a>00778 {
<a name="l00779"></a>00779 <span class="keyword">public</span>:
<a name="l00780"></a>00780
<a name="l00781"></a>00781 RtApiJack();
<a name="l00782"></a>00782 ~RtApiJack();
<a name="l00783"></a>00783 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">RtAudio::UNIX_JACK</a>; };
<a name="l00784"></a>00784 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00785"></a>00785 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00786"></a>00786 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00787"></a>00787 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00788"></a>00788 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00789"></a>00789 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00790"></a>00790 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00791"></a>00791
<a name="l00792"></a>00792 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00793"></a>00793 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00794"></a>00794 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00795"></a>00795 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00796"></a>00796 <span class="keywordtype">bool</span> callbackEvent( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> nframes );
<a name="l00797"></a>00797
<a name="l00798"></a>00798 <span class="keyword">private</span>:
<a name="l00799"></a>00799
<a name="l00800"></a>00800 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00801"></a>00801 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00802"></a>00802 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00803"></a>00803 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00804"></a>00804 };
<a name="l00805"></a>00805
<a name="l00806"></a>00806 <span class="preprocessor">#endif</span>
<a name="l00807"></a>00807 <span class="preprocessor"></span>
<a name="l00808"></a>00808 <span class="preprocessor">#if defined(__WINDOWS_ASIO__)</span>
<a name="l00809"></a>00809 <span class="preprocessor"></span>
<a name="l00810"></a>00810 <span class="keyword">class </span>RtApiAsio: <span class="keyword">public</span> RtApi
<a name="l00811"></a>00811 {
<a name="l00812"></a>00812 <span class="keyword">public</span>:
<a name="l00813"></a>00813
<a name="l00814"></a>00814 RtApiAsio();
<a name="l00815"></a>00815 ~RtApiAsio();
<a name="l00816"></a>00816 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">RtAudio::WINDOWS_ASIO</a>; };
<a name="l00817"></a>00817 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00818"></a>00818 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00819"></a>00819 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00820"></a>00820 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00821"></a>00821 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00822"></a>00822 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00823"></a>00823 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00824"></a>00824
<a name="l00825"></a>00825 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00826"></a>00826 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00827"></a>00827 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00828"></a>00828 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00829"></a>00829 <span class="keywordtype">bool</span> callbackEvent( <span class="keywordtype">long</span> bufferIndex );
<a name="l00830"></a>00830
<a name="l00831"></a>00831 <span class="keyword">private</span>:
<a name="l00832"></a>00832
<a name="l00833"></a>00833 std::vector&lt;RtAudio::DeviceInfo&gt; devices_;
<a name="l00834"></a>00834 <span class="keywordtype">void</span> saveDeviceInfo( <span class="keywordtype">void</span> );
<a name="l00835"></a>00835 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00836"></a>00836 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00837"></a>00837 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00838"></a>00838 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00839"></a>00839 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00840"></a>00840 };
<a name="l00841"></a>00841
<a name="l00842"></a>00842 <span class="preprocessor">#endif</span>
<a name="l00843"></a>00843 <span class="preprocessor"></span>
<a name="l00844"></a>00844 <span class="preprocessor">#if defined(__WINDOWS_DS__)</span>
<a name="l00845"></a>00845 <span class="preprocessor"></span>
<a name="l00846"></a>00846 <span class="keyword">class </span>RtApiDs: <span class="keyword">public</span> RtApi
<a name="l00847"></a>00847 {
<a name="l00848"></a>00848 <span class="keyword">public</span>:
<a name="l00849"></a>00849
<a name="l00850"></a>00850 RtApiDs();
<a name="l00851"></a>00851 ~RtApiDs();
<a name="l00852"></a>00852 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">RtAudio::WINDOWS_DS</a>; };
<a name="l00853"></a>00853 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00854"></a>00854 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultOutputDevice( <span class="keywordtype">void</span> );
<a name="l00855"></a>00855 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDefaultInputDevice( <span class="keywordtype">void</span> );
<a name="l00856"></a>00856 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00857"></a>00857 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00858"></a>00858 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00859"></a>00859 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00860"></a>00860 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00861"></a>00861 <span class="keywordtype">long</span> getStreamLatency( <span class="keywordtype">void</span> );
<a name="l00862"></a>00862
<a name="l00863"></a>00863 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00864"></a>00864 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00865"></a>00865 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00866"></a>00866 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00867"></a>00867 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00868"></a>00868
<a name="l00869"></a>00869 <span class="keyword">private</span>:
<a name="l00870"></a>00870
<a name="l00871"></a>00871 <span class="keywordtype">bool</span> coInitialized_;
<a name="l00872"></a>00872 <span class="keywordtype">bool</span> buffersRolling;
<a name="l00873"></a>00873 <span class="keywordtype">long</span> duplexPrerollBytes;
<a name="l00874"></a>00874 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00875"></a>00875 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00876"></a>00876 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00877"></a>00877 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00878"></a>00878 };
<a name="l00879"></a>00879
<a name="l00880"></a>00880 <span class="preprocessor">#endif</span>
<a name="l00881"></a>00881 <span class="preprocessor"></span>
<a name="l00882"></a>00882 <span class="preprocessor">#if defined(__LINUX_ALSA__)</span>
<a name="l00883"></a>00883 <span class="preprocessor"></span>
<a name="l00884"></a>00884 <span class="keyword">class </span>RtApiAlsa: <span class="keyword">public</span> RtApi
<a name="l00885"></a>00885 {
<a name="l00886"></a>00886 <span class="keyword">public</span>:
<a name="l00887"></a>00887
<a name="l00888"></a>00888 RtApiAlsa();
<a name="l00889"></a>00889 ~RtApiAlsa();
<a name="l00890"></a>00890 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">RtAudio::LINUX_ALSA</a>; };
<a name="l00891"></a>00891 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00892"></a>00892 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00893"></a>00893 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00894"></a>00894 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00895"></a>00895 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00896"></a>00896 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00897"></a>00897
<a name="l00898"></a>00898 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00899"></a>00899 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00900"></a>00900 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00901"></a>00901 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00902"></a>00902 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00903"></a>00903
<a name="l00904"></a>00904 <span class="keyword">private</span>:
<a name="l00905"></a>00905
<a name="l00906"></a>00906 std::vector&lt;RtAudio::DeviceInfo&gt; devices_;
<a name="l00907"></a>00907 <span class="keywordtype">void</span> saveDeviceInfo( <span class="keywordtype">void</span> );
<a name="l00908"></a>00908 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00909"></a>00909 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00910"></a>00910 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00911"></a>00911 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00912"></a>00912 };
<a name="l00913"></a>00913
<a name="l00914"></a>00914 <span class="preprocessor">#endif</span>
<a name="l00915"></a>00915 <span class="preprocessor"></span>
<a name="l00916"></a>00916 <span class="preprocessor">#if defined(__LINUX_PULSE__)</span>
<a name="l00917"></a>00917 <span class="preprocessor"></span>
<a name="l00918"></a>00918 <span class="keyword">class </span>RtApiPulse: <span class="keyword">public</span> RtApi
<a name="l00919"></a>00919 {
<a name="l00920"></a>00920 <span class="keyword">public</span>:
<a name="l00921"></a>00921 ~RtApiPulse();
<a name="l00922"></a>00922 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">RtAudio::LINUX_PULSE</a>; };
<a name="l00923"></a>00923 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00924"></a>00924 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00925"></a>00925 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00926"></a>00926 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00927"></a>00927 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00928"></a>00928 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00929"></a>00929
<a name="l00930"></a>00930 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00931"></a>00931 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00932"></a>00932 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00933"></a>00933 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00934"></a>00934 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00935"></a>00935
<a name="l00936"></a>00936 <span class="keyword">private</span>:
<a name="l00937"></a>00937
<a name="l00938"></a>00938 std::vector&lt;RtAudio::DeviceInfo&gt; devices_;
<a name="l00939"></a>00939 <span class="keywordtype">void</span> saveDeviceInfo( <span class="keywordtype">void</span> );
<a name="l00940"></a>00940 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00941"></a>00941 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00942"></a>00942 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00943"></a>00943 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00944"></a>00944 };
<a name="l00945"></a>00945
<a name="l00946"></a>00946 <span class="preprocessor">#endif</span>
<a name="l00947"></a>00947 <span class="preprocessor"></span>
<a name="l00948"></a>00948
<a name="l00949"></a>00949 <span class="preprocessor">#if defined(__LINUX_OSS__)</span>
<a name="l00950"></a>00950 <span class="preprocessor"></span>
<a name="l00951"></a>00951 <span class="keyword">class </span>RtApiOss: <span class="keyword">public</span> RtApi
<a name="l00952"></a>00952 {
<a name="l00953"></a>00953 <span class="keyword">public</span>:
<a name="l00954"></a>00954
<a name="l00955"></a>00955 RtApiOss();
<a name="l00956"></a>00956 ~RtApiOss();
<a name="l00957"></a>00957 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi() { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">RtAudio::LINUX_OSS</a>; };
<a name="l00958"></a>00958 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> );
<a name="l00959"></a>00959 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device );
<a name="l00960"></a>00960 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> );
<a name="l00961"></a>00961 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> );
<a name="l00962"></a>00962 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> );
<a name="l00963"></a>00963 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> );
<a name="l00964"></a>00964
<a name="l00965"></a>00965 <span class="comment">// This function is intended for internal use only. It must be</span>
<a name="l00966"></a>00966 <span class="comment">// public because it is called by the internal callback handler,</span>
<a name="l00967"></a>00967 <span class="comment">// which is not a member of RtAudio. External use of this function</span>
<a name="l00968"></a>00968 <span class="comment">// will most likely produce highly undesireable results!</span>
<a name="l00969"></a>00969 <span class="keywordtype">void</span> callbackEvent( <span class="keywordtype">void</span> );
<a name="l00970"></a>00970
<a name="l00971"></a>00971 <span class="keyword">private</span>:
<a name="l00972"></a>00972
<a name="l00973"></a>00973 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00974"></a>00974 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l00975"></a>00975 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l00976"></a>00976 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options );
<a name="l00977"></a>00977 };
<a name="l00978"></a>00978
<a name="l00979"></a>00979 <span class="preprocessor">#endif</span>
<a name="l00980"></a>00980 <span class="preprocessor"></span>
<a name="l00981"></a>00981 <span class="preprocessor">#if defined(__RTAUDIO_DUMMY__)</span>
<a name="l00982"></a>00982 <span class="preprocessor"></span>
<a name="l00983"></a>00983 <span class="keyword">class </span>RtApiDummy: <span class="keyword">public</span> RtApi
<a name="l00984"></a>00984 {
<a name="l00985"></a>00985 <span class="keyword">public</span>:
<a name="l00986"></a>00986
<a name="l00987"></a>00987 RtApiDummy() { errorText_ = <span class="stringliteral">&quot;RtApiDummy: This class provides no functionality.&quot;</span>; error( <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">RtError::WARNING</a> ); };
<a name="l00988"></a>00988 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849" title="Audio API specifier arguments.">RtAudio::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RtAudio::RTAUDIO_DUMMY</a>; };
<a name="l00989"></a>00989 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getDeviceCount( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> 0; };
<a name="l00990"></a>00990 <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> getDeviceInfo( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device ) { <a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> info; <span class="keywordflow">return</span> info; };
<a name="l00991"></a>00991 <span class="keywordtype">void</span> closeStream( <span class="keywordtype">void</span> ) {};
<a name="l00992"></a>00992 <span class="keywordtype">void</span> startStream( <span class="keywordtype">void</span> ) {};
<a name="l00993"></a>00993 <span class="keywordtype">void</span> stopStream( <span class="keywordtype">void</span> ) {};
<a name="l00994"></a>00994 <span class="keywordtype">void</span> abortStream( <span class="keywordtype">void</span> ) {};
<a name="l00995"></a>00995
<a name="l00996"></a>00996 <span class="keyword">private</span>:
<a name="l00997"></a>00997
<a name="l00998"></a>00998 <span class="keywordtype">bool</span> probeDeviceOpen( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> device, StreamMode mode, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels,
<a name="l00999"></a>00999 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> firstChannel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate,
<a name="l01000"></a>01000 <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> format, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *bufferSize,
<a name="l01001"></a>01001 <a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> *options ) { <span class="keywordflow">return</span> <span class="keyword">false</span>; };
<a name="l01002"></a>01002 };
<a name="l01003"></a>01003
<a name="l01004"></a>01004 <span class="preprocessor">#endif</span>
<a name="l01005"></a>01005 <span class="preprocessor"></span>
<a name="l01006"></a>01006 <span class="preprocessor">#endif</span>
<a name="l01007"></a>01007 <span class="preprocessor"></span>
<a name="l01008"></a>01008 <span class="comment">// Indentation settings for Vim and Emacs</span>
<a name="l01009"></a>01009 <span class="comment">//</span>
<a name="l01010"></a>01010 <span class="comment">// Local Variables:</span>
<a name="l01011"></a>01011 <span class="comment">// c-basic-offset: 2</span>
<a name="l01012"></a>01012 <span class="comment">// indent-tabs-mode: nil</span>
<a name="l01013"></a>01013 <span class="comment">// End:</span>
<a name="l01014"></a>01014 <span class="comment">//</span>
<a name="l01015"></a>01015 <span class="comment">// vim: et sts=2 sw=2</span>
</pre></div></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 65
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/RtError_8h-source.html View File

@@ -0,0 +1,65 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.5.8 -->
<h1>RtError.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/************************************************************************/</span>
<a name="l00010"></a>00010 <span class="comment">/************************************************************************/</span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012 <span class="preprocessor">#ifndef RTERROR_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define RTERROR_H</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;exception&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00018"></a>00018
<a name="l00019"></a><a class="code" href="classRtError.html">00019</a> <span class="keyword">class </span><a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a> : <span class="keyword">public</span> std::exception
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021 <span class="keyword">public</span>:
<a name="l00023"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac">00023</a> <span class="keyword">enum</span> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a> {
<a name="l00024"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac3a1603c24a56cbdaf5f8ae4ddcb86398">00024</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac3a1603c24a56cbdaf5f8ae4ddcb86398">WARNING</a>,
<a name="l00025"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac20e5a369394d19b704ace17002007eba">00025</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac20e5a369394d19b704ace17002007eba">DEBUG_WARNING</a>,
<a name="l00026"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac444efd3ccf774b2ba9f9bde70ec71cd6">00026</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac444efd3ccf774b2ba9f9bde70ec71cd6">UNSPECIFIED</a>,
<a name="l00027"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903acf267eb2d710f33d649ba840eeab6ff82">00027</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903acf267eb2d710f33d649ba840eeab6ff82">NO_DEVICES_FOUND</a>,
<a name="l00028"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903acd6064062066fffdba258237a7c2159b1">00028</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903acd6064062066fffdba258237a7c2159b1">INVALID_DEVICE</a>,
<a name="l00029"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903acb4f813e5a36905c89d4081a59497432e">00029</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903acb4f813e5a36905c89d4081a59497432e">MEMORY_ERROR</a>,
<a name="l00030"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903aca3eabf0f71120beaba94148a1b78fed6">00030</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903aca3eabf0f71120beaba94148a1b78fed6">INVALID_PARAMETER</a>,
<a name="l00031"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac8e65f51a3fbdc1a4a1552b3260df36bc">00031</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac8e65f51a3fbdc1a4a1552b3260df36bc">INVALID_USE</a>,
<a name="l00032"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac995e97ecf6beeedaba525022a63aec6b">00032</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac995e97ecf6beeedaba525022a63aec6b">DRIVER_ERROR</a>,
<a name="l00033"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac8947d0a2e2a84ecf3646271844e06a6b">00033</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac8947d0a2e2a84ecf3646271844e06a6b">SYSTEM_ERROR</a>,
<a name="l00034"></a><a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903aceb6282f991e2d93ab294a4272fc3f6c6">00034</a> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903aceb6282f991e2d93ab294a4272fc3f6c6">THREAD_ERROR</a>
<a name="l00035"></a>00035 };
<a name="l00036"></a>00036
<a name="l00038"></a><a class="code" href="classRtError.html#a479a305ccbe56be0fd9137b9b405a37">00038</a> <a class="code" href="classRtError.html#a479a305ccbe56be0fd9137b9b405a37" title="The constructor.">RtError</a>( <span class="keyword">const</span> std::string&amp; message, <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a> type = <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac444efd3ccf774b2ba9f9bde70ec71cd6">RtError::UNSPECIFIED</a> ) throw() : message_(message), type_(type) {}
<a name="l00039"></a>00039
<a name="l00041"></a><a class="code" href="classRtError.html#6793e03386e7e69ffafb65a296dfa48c">00041</a> <span class="keyword">virtual</span> <a class="code" href="classRtError.html#6793e03386e7e69ffafb65a296dfa48c" title="The destructor.">~RtError</a>( <span class="keywordtype">void</span> ) throw() {}
<a name="l00042"></a>00042
<a name="l00044"></a><a class="code" href="classRtError.html#da41f7472122f45bc5b4677f066e0943">00044</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtError.html#da41f7472122f45bc5b4677f066e0943" title="Prints thrown error message to stderr.">printMessage</a>( <span class="keywordtype">void</span> ) throw() { std::cerr &lt;&lt; <span class="charliteral">'\n'</span> &lt;&lt; message_ &lt;&lt; <span class="stringliteral">"\n\n"</span>; }
<a name="l00045"></a>00045
<a name="l00047"></a><a class="code" href="classRtError.html#4ee7df9728d73f533afbaddcd9ca4d9c">00047</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a>&amp; <a class="code" href="classRtError.html#4ee7df9728d73f533afbaddcd9ca4d9c" title="Returns the thrown error message type.">getType</a>(<span class="keywordtype">void</span>) throw() { <span class="keywordflow">return</span> type_; }
<a name="l00048"></a>00048
<a name="l00050"></a><a class="code" href="classRtError.html#c7f467788e29d246333d7af050801164">00050</a> <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code" href="classRtError.html#c7f467788e29d246333d7af050801164" title="Returns the thrown error message string.">getMessage</a>(<span class="keywordtype">void</span>) throw() { <span class="keywordflow">return</span> message_; }
<a name="l00051"></a>00051
<a name="l00053"></a><a class="code" href="classRtError.html#eb843b7a7785d66061c61ebfc29e7e9d">00053</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classRtError.html#eb843b7a7785d66061c61ebfc29e7e9d" title="Returns the thrown error message as a c-style string.">what</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> message_.c_str(); }
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <span class="keyword">protected</span>:
<a name="l00056"></a>00056 std::string message_;
<a name="l00057"></a>00057 <a class="code" href="classRtError.html#b04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a> type_;
<a name="l00058"></a>00058 };
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="preprocessor">#endif</span>
</pre></div></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2009 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 65
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/RtError_8h_source.html View File

@@ -0,0 +1,65 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<h1>RtError.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/************************************************************************/</span>
<a name="l00010"></a>00010 <span class="comment">/************************************************************************/</span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012 <span class="preprocessor">#ifndef RTERROR_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define RTERROR_H</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;exception&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00018"></a>00018
<a name="l00019"></a><a class="code" href="classRtError.html">00019</a> <span class="keyword">class </span><a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a> : <span class="keyword">public</span> std::exception
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021 <span class="keyword">public</span>:
<a name="l00023"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">00023</a> <span class="keyword">enum</span> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a> {
<a name="l00024"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">00024</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">WARNING</a>,
<a name="l00025"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba">00025</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba">DEBUG_WARNING</a>,
<a name="l00026"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6">00026</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6">UNSPECIFIED</a>,
<a name="l00027"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82">00027</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82">NO_DEVICES_FOUND</a>,
<a name="l00028"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1">00028</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1">INVALID_DEVICE</a>,
<a name="l00029"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e">00029</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e">MEMORY_ERROR</a>,
<a name="l00030"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6">00030</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6">INVALID_PARAMETER</a>,
<a name="l00031"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc">00031</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc">INVALID_USE</a>,
<a name="l00032"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b">00032</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b">DRIVER_ERROR</a>,
<a name="l00033"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b">00033</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b">SYSTEM_ERROR</a>,
<a name="l00034"></a><a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6">00034</a> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6">THREAD_ERROR</a>
<a name="l00035"></a>00035 };
<a name="l00036"></a>00036
<a name="l00038"></a><a class="code" href="classRtError.html#aa479a305ccbe56be0fd9137b9b405a37">00038</a> <a class="code" href="classRtError.html#aa479a305ccbe56be0fd9137b9b405a37" title="The constructor.">RtError</a>( <span class="keyword">const</span> std::string&amp; message, <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a> type = <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6">RtError::UNSPECIFIED</a> ) throw() : message_(message), type_(type) {}
<a name="l00039"></a>00039
<a name="l00041"></a><a class="code" href="classRtError.html#a6793e03386e7e69ffafb65a296dfa48c">00041</a> <span class="keyword">virtual</span> <a class="code" href="classRtError.html#a6793e03386e7e69ffafb65a296dfa48c" title="The destructor.">~RtError</a>( <span class="keywordtype">void</span> ) throw() {}
<a name="l00042"></a>00042
<a name="l00044"></a><a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc">00044</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc" title="Prints thrown error message to stderr.">printMessage</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span> throw() { std::cerr &lt;&lt; <span class="charliteral">&#39;\n&#39;</span> &lt;&lt; message_ &lt;&lt; <span class="stringliteral">&quot;\n\n&quot;</span>; }
<a name="l00045"></a>00045
<a name="l00047"></a><a class="code" href="classRtError.html#a3e316dc9b9b41fe2f64cabf34beb4fe7">00047</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a>&amp; <a class="code" href="classRtError.html#a3e316dc9b9b41fe2f64cabf34beb4fe7" title="Returns the thrown error message type.">getType</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> type_; }
<a name="l00048"></a>00048
<a name="l00050"></a><a class="code" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50">00050</a> <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50" title="Returns the thrown error message string.">getMessage</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> message_; }
<a name="l00051"></a>00051
<a name="l00053"></a><a class="code" href="classRtError.html#aeb843b7a7785d66061c61ebfc29e7e9d">00053</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classRtError.html#aeb843b7a7785d66061c61ebfc29e7e9d" title="Returns the thrown error message as a c-style string.">what</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span> throw() { <span class="keywordflow">return</span> message_.c_str(); }
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <span class="keyword">protected</span>:
<a name="l00056"></a>00056 std::string message_;
<a name="l00057"></a>00057 <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">Type</a> type_;
<a name="l00058"></a>00058 };
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="preprocessor">#endif</span>
</pre></div></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 62
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/acknowledge.html View File

@@ -0,0 +1,62 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="acknowledge">Acknowledgements </a></h1><p>Many thanks to the following people for providing bug fixes and improvements: </p>
<ul>
<li>
Stefan Arisona </li>
<li>
Vincent B&eacute;nony </li>
<li>
Rasmus Ekman </li>
<li>
Anders Ervik </li>
<li>
Robin Davies (Windows DS and ASIO) </li>
<li>
Martin Koegler </li>
<li>
Dmitry Kostjuchenko </li>
<li>
Oliver Larkin </li>
<li>
Antoine Lefebvre </li>
<li>
Carlos Luna </li>
<li>
Dominic Mazzoni </li>
<li>
Tristan Matthews </li>
<li>
Peter Meerwald (PulseAudio) </li>
<li>
Benjamin Schroeder </li>
<li>
Ryan Williams (Windows non-MS compiler ASIO support) </li>
<li>
<p class="startli">Ed Wildgoose (Linux ALSA and Jack)</p>
<p class="endli"></p>
</li>
</ul>
<p>The <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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.</p>
<p>The early 2.0 version of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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>. All recent versions of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> have been completed while working as an assistant / associate 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). </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 28
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/annotated.html View File

@@ -0,0 +1,28 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td class="indexvalue">The public device information structure for returning queried values </td></tr>
<tr><td class="indexkey"><a class="el" href="classRtAudio.html">RtAudio</a></td><td class="indexvalue">Realtime audio i/o C++ classes </td></tr>
<tr><td class="indexkey"><a class="el" href="classRtError.html">RtError</a></td><td class="indexvalue">Exception handling class for <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> &amp; RtMidi </td></tr>
<tr><td class="indexkey"><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a></td><td class="indexvalue">The structure for specifying stream options </td></tr>
<tr><td class="indexkey"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a></td><td class="indexvalue">The structure for specifying input or ouput stream parameters </td></tr>
</table>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 45
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/apinotes.html View File

@@ -0,0 +1,45 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="apinotes">API Notes </a></h1><p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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.</p>
<h2><a class="anchor" id="linux">
Linux:</a></h2>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> for Linux was developed under Redhat distributions 7.0 - Fedora. Four different audio APIs are supported on Linux platforms: <a href="http://www.opensound.com/oss.html">OSS</a> (versions &gt;= 4.0), <a href="http://www.alsa-project.org/">ALSA</a>, <a href="http://jackit.sourceforge.net/">Jack</a>, and <a href="http://www.freedesktop.org/wiki/Software/PulseAudio">PulseAudio</a>. Note that <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> now only supports the newer version 4.0 OSS API. The ALSA API is now part of the Linux kernel and offers significantly better functionality than the OSS API. <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> provides support for the 1.0 and higher versions of ALSA. Jack 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 <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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.</p>
<p>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 <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> tests, it is recommended that the native ALSA implementation of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> be used on systems which have ALSA drivers installed.</p>
<p>The ALSA implementation of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> makes no use of the ALSA "plug" interface. All necessary data format conversions, channel compensation, de-interleaving, and byte-swapping is handled by internal <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> routines.</p>
<h2><a class="anchor" id="macosx">
Macintosh OS-X (CoreAudio and Jack):</a></h2>
<p>The Apple CoreAudio API is designed to use a separate callback procedure for each of its audio devices. A single <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> duplex stream using two different devices is supported, though it cannot be guaranteed to always behave correctly because we cannot synchronize these two callbacks. The <em>numberOfBuffers</em> parameter to the <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> function has no affect in this implementation.</p>
<p>It is not possible to have multiple instances of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> accessing the same CoreAudio device.</p>
<p>The <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> Jack support can be compiled on Macintosh OS-X systems, as well as in Linux.</p>
<h2><a class="anchor" id="windowsds">
Windows (DirectSound):</a></h2>
<p>The <code>configure</code> script provides support for the MinGW compiler. DirectSound support is specified with the "--with-ds" flag.</p>
<p>In order to compile <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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, especially since <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> version 3.0.2. Input audio latency still tends to be bad but better since version 3.0.2. <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> was originally developed with Visual C++ version 6.0 but has been tested with .NET.</p>
<p>The DirectSound version of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> can be compiled with or without the UNICODE preprocessor definition.</p>
<h2><a class="anchor" id="windowsasio">
Windows (ASIO):</a></h2>
<p>ASIO support using MinGW and the <code>configure</code> script is specified with the "--with-asio" flag.</p>
<p>The Steinberg ASIO audio 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 <em>numberOfBuffers</em> parameter to the <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> function has no affect in this implementation.</p>
<p>A number of ASIO source and header files are required for use with <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>. Specifically, an <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> project must include the following files: <code>asio.h,cpp; asiodrivers.h,cpp; asiolist.h,cpp; asiodrvr.h; asiosys.h; ginclude.h; iasiodrv.h; iasiothiscallresolver.h,cpp</code>. The Visual C++ projects found in <code>/tests/Windows/</code> compile both ASIO and DirectSound support.</p>
<p>The Steinberg provided <code>asiolist</code> class does not compile when the preprocessor definition UNICODE is defined. Note that this could be an issue when using <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> with Qt, though Qt programs appear to compile without the UNICODE definition (try <code>DEFINES -= UNICODE</code> in your .pro file). <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> with ASIO support has been tested using the MinGW compiler under Windows XP, as well as in the Visual Studio environment. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 57
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/bugs.html View File

@@ -0,0 +1,57 @@
<html>
<head>
<title>RtAudio Bugs</title>
</head>
<body bgcolor="#FFFFFF">

<center><h1>RtAudio Bug Tracker</h1></center>

"Bugs" are considered to be problems that cause program crashes or unpredictable results. Incomplete or unavailable features are tracked as <a href="updates.html">updates</a>.

<h2>Reported (Unconfirmed) Bugs:</h2>

<table border=1 cellpadding=10 cellspacing=0>
<tr bgcolor="#C7CAFF"><td><b>#</b></td><td><b>Version</b></td><td><b>API</b></td><td><b>Description</b></td><td><b>Status</b></td></b></tr>

</table>

<h2>Confirmed Bugs (Unfixed):</h2>

<table border=1 cellpadding=10 cellspacing=0>
<tr bgcolor="#C7CAFF"><td><b>#</b></td><td><b>Version</b></td><td><b>API</b></td><td><b>Description</b></td></tr>

</table>

<h2>Fixed Bugs:</h2>

<table border=1 cellpadding=10 cellspacing=0>
<tr bgcolor="#C7CAFF"><td><b>#</b></td><td><b>Version</b></td><td><b>API</b></td><td><b>Description</b></td></tr>
<tr><td>24</td><td>4.0.8</td><td>All</td><td>Various updates to most APIs to improve stopping efficiency and avoid lockup issues</td></tr>
<tr><td>23</td><td>4.0.8</td><td>All</td><td>New python binding in "contrib" directory (beta, thanks to Antoine Lefebvre)</td></tr>
<tr><td>22</td><td>4.0.8</td><td>OS-X</td><td>Fixed problem handling device names in some languages (CFString conversion, Vincent B&eacute;nony)</td></tr>
<tr><td>21</td><td>4.0.8</td><td>ASIO</td><td>Fixed problem using gcc4.4 (MinGW) to set and query supported sample rates</td></tr>
<tr><td>20</td><td>4.0.6</td><td>OS-X</td><td>Fixed OS-X for OS < 10.5 ... need preprocessor definition around new variable type (thanks to Tristan Matthews)</td></tr>
<tr><td>19</td><td>4.0.6</td><td>ALSA</td><td>Fixed ALSA code to set period size to power of two (thanks to Joakim Karrstrom)</td></tr>
<tr><td>18</td><td>4.0.5</td><td>ASIO</td><td>Fixed ASIO sample rate selection bug (thanks to Sasha Zheligovsky)</td></tr>
<tr><td>17</td><td>4.0.5</td><td>ALSA</td><td>64-bit fixes in ALSA API (thanks to Stefan Muller Arisona)</td></tr>
<tr><td>16</td><td>4.0.5</td><td>All</td><td>Fixed bug in rtaudio-config script</td></tr>
<tr><td>15</td><td>4.0.5</td><td>OS-X</td><td>Fixed a few gcc 4.4 errors in OS-X</td></tr>
<tr><td>14</td><td>4.0.5</td><td>All</td><td>Bug fix in byteSwapBuffer() (thanks to Stefan Muller Arisona and Theo Veenker)</td></tr>
<tr><td>13</td><td>4.0.5</td><td>All</td><td>Fix to int<->float conversion in convertBuffer() (thanks to Theo Veenker)</td></tr>
<tr><td>12</td><td>4.0.5</td><td>All</td><td>Fix to the way the stream state is changed to avoid infinite loop problem</td></tr>
<tr><td>11</td><td>4.0.4</td><td>All</td><td>Fixes in configure script</td></tr>
<tr><td>10</td><td>4.0.4</td><td>All</td><td>Fixed clearing of error message stream in error()</td></tr>
<tr><td>9</td><td>4.0.4</td><td>All</td><td>Fixed RtAudio::DeviceInfo description in "probing" documentation</td></tr>
<tr><td>8</td><td>4.0.4</td><td>ALSA/OSS</td><td>Memory leak fixes in ALSA and OSS</td></tr>
<tr><td>7</td><td>4.0.4</td><td>Jack</td><td>Jack in/out port flag fix</td></tr>
<tr><td>6</td><td>4.0.2</td><td>All</td><td>Fix to RtError::WARNING typo in RtAudio.h (RtApiDummy)</td></tr>
<tr><td>5</td><td>4.0.1</td><td>All</td><td>Fix to RtError::WARNING typo in RtAudio.cpp</td></tr>
<tr><td>4</td><td>4.0</td><td>CoreAudio</td><td>RtAudio checks a device's <i>internal</i> data format and sets it to the highest allowable bit rate. For some stupid devices, like the Griffin iMic, the default format is 8-bit mono when the requested format and number of channels does not exist. So, we need to query the device's capabilities using the kAudioStreamPropertyPhysicalFormats selector - i.e. ask a device for all of the channels/format/rate combination that it supports - and then enumerate through them to pick the best one.</td></tr>
<tr><td>3</td><td>4.0</td><td>ALSA</td><td>Changed sample rate setting to use <tt>snd_pcm_hw_params_set_rate_near()</tt> function</td></tr>
<tr><td>2</td><td>4.0</td><td>All unices</td><td>Default pthread scheduling priority changed to SCHED_RR when defined</td></tr>
<tr><td>1</td><td>4.0</td><td>Windows DS</td><td>Memory allocation bug in device querying</td></tr>
</table>


</body>
</html>

+ 51
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/classRtAudio-members.html View File

@@ -0,0 +1,51 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtAudio Member List</h1>This is the complete list of members for <a class="el" href="classRtAudio.html">RtAudio</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f">abortStream</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">Api</a> enum name</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a">closeStream</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26">getCompiledApi</a>(std::vector&lt; RtAudio::Api &gt; &amp;apis)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [static]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246">getCurrentApi</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce">getDefaultInputDevice</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc">getDefaultOutputDevice</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a">getDeviceCount</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8">getDeviceInfo</a>(unsigned int device)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3">getStreamLatency</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5">getStreamSampleRate</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca">getStreamTime</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f">isStreamOpen</a>(void) const </td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea">isStreamRunning</a>(void) const </td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">LINUX_ALSA</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">LINUX_OSS</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">LINUX_PULSE</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">MACOSX_CORE</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8">openStream</a>(RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9">RtAudio</a>(RtAudio::Api api=UNSPECIFIED)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RTAUDIO_DUMMY</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77">showWarnings</a>(bool value=true)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80">startStream</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd">stopStream</a>(void)</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">UNIX_JACK</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">WINDOWS_ASIO</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">WINDOWS_DS</a> enum value</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtAudio.html#aa8a9716fd64680657ef69c9465442a2f">~RtAudio</a>()</td><td><a class="el" href="classRtAudio.html">RtAudio</a></td><td></td></tr>
</table></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 534
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/classRtAudio.html View File

@@ -0,0 +1,534 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtAudio Class Reference</h1><!-- doxytag: class="RtAudio" -->
<p>Realtime audio i/o C++ classes.
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="RtAudio_8h_source.html">RtAudio.h</a>&gt;</code></p>

<p><a href="classRtAudio-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html">DeviceInfo</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The public device information structure for returning queried values. <a href="structRtAudio_1_1DeviceInfo.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html">StreamOptions</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The structure for specifying stream options. <a href="structRtAudio_1_1StreamOptions.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html">StreamParameters</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The structure for specifying input or ouput stream parameters. <a href="structRtAudio_1_1StreamParameters.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">Api</a> { <br/>
&nbsp;&nbsp;<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">LINUX_ALSA</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">LINUX_PULSE</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">LINUX_OSS</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">UNIX_JACK</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">MACOSX_CORE</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">WINDOWS_ASIO</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">WINDOWS_DS</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RTAUDIO_DUMMY</a>
<br/>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Audio API specifier arguments. </p>
<a href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9">RtAudio</a> (<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> api=UNSPECIFIED) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The class constructor. <a href="#afd0bfa26deae9804e18faff59d0273d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aa8a9716fd64680657ef69c9465442a2f">~RtAudio</a> () throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The destructor. <a href="#aa8a9716fd64680657ef69c9465442a2f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83687634795792b2c47e4ae1cf8a5246"></a><!-- doxytag: member="RtAudio::getCurrentApi" ref="a83687634795792b2c47e4ae1cf8a5246" args="(void)" -->
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246">getCurrentApi</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the audio API specifier for the current instance of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a">getDeviceCount</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public function that queries for the number of audio devices available. <a href="#a747ce2d73803641bbb66d6e78092aa1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8">getDeviceInfo</a> (unsigned int device)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure for a specified device number. <a href="#a02d7ff44ad1d7eae22283a052f3dfda8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc">getDefaultOutputDevice</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that returns the index of the default output device. <a href="#a3a3f3dbe13ea696b521e49cdaaa357bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce">getDefaultInputDevice</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that returns the index of the default input device. <a href="#aad8b94edd3cd379ee300b125750ac6ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8">openStream</a> (<a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *outputParameters, <a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *inputParameters, <a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a> format, unsigned int sampleRate, unsigned int *bufferFrames, <a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a> callback, void *userData=NULL, <a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options=NULL)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public function for opening a stream with the specified parameters. <a href="#afacc99740fa4c5606fb35467cdea6da8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a">closeStream</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that closes a stream and frees any associated stream memory. <a href="#a90d599002ad32cf250a4cb866f2cc93a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80">startStream</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that starts a stream. <a href="#aec017a89629ccef66a90b60be22a2f80"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd">stopStream</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a stream, allowing any samples remaining in the output queue to be played. <a href="#af4c241ff86936ecc8108f0d9dfe3efdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f">abortStream</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a stream, discarding any samples remaining in the input/output queue. <a href="#ad0586b47cd6bb9591a80b4052815991f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3863e45ff81dbe97176de0ee7545917f"></a><!-- doxytag: member="RtAudio::isStreamOpen" ref="a3863e45ff81dbe97176de0ee7545917f" args="(void) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f">isStreamOpen</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a stream is open and false if not. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84cc8d9b7ab9bc5f37bcf48430ec5aea"></a><!-- doxytag: member="RtAudio::isStreamRunning" ref="a84cc8d9b7ab9bc5f37bcf48430ec5aea" args="(void) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea">isStreamRunning</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the stream is running and false if it is stopped or not open. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca">getStreamTime</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of elapsed seconds since the stream was started. <a href="#a344e59a62353c5791db4621b985cb2ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3">getStreamLatency</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the internal stream latency in sample frames. <a href="#a843c989d9f501c71bc2f2c5ca18df9f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5">getStreamSampleRate</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns actual sample rate in use by the stream. <a href="#a28214b8b05d60b45c24ee6fae7b2a0b5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0752ee51cce3dd90a3bd009f9fdbe77"></a><!-- doxytag: member="RtAudio::showWarnings" ref="af0752ee51cce3dd90a3bd009f9fdbe77" args="(bool value=true)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77">showWarnings</a> (bool value=true) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specify whether warning messages should be printed to stderr. <br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26">getCompiledApi</a> (std::vector&lt; <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> &gt; &amp;apis) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A static function to determine the available compiled audio APIs. <a href="#ae266ffad2ef428d0b2c6c262d391ce26"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Realtime audio i/o C++ classes. </p>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, Jack, and OSS), Macintosh OS X (CoreAudio and Jack), and Windows (DirectSound and ASIO) operating systems.</p>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> WWW site: <a href="http://www.music.mcgill.ca/~gary/rtaudio/">http://www.music.mcgill.ca/~gary/rtaudio/</a></p>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>: realtime audio i/o C++ classes Copyright (c) 2001-2012 Gary P. Scavone</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849"></a><!-- doxytag: member="RtAudio::Api" ref="ac9b6f625da88249d08a8409a9db0d849" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Audio API specifier arguments. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae"></a><!-- doxytag: member="UNSPECIFIED" ref="ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae" args="" -->UNSPECIFIED</em>&nbsp;</td><td>
<p>Search for a working compiled API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8"></a><!-- doxytag: member="LINUX_ALSA" ref="ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8" args="" -->LINUX_ALSA</em>&nbsp;</td><td>
<p>The Advanced Linux Sound Architecture API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77"></a><!-- doxytag: member="LINUX_PULSE" ref="ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77" args="" -->LINUX_PULSE</em>&nbsp;</td><td>
<p>The Linux PulseAudio API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82"></a><!-- doxytag: member="LINUX_OSS" ref="ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82" args="" -->LINUX_OSS</em>&nbsp;</td><td>
<p>The Linux Open Sound System API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105"></a><!-- doxytag: member="UNIX_JACK" ref="ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105" args="" -->UNIX_JACK</em>&nbsp;</td><td>
<p>The Jack Low-Latency Audio Server API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d"></a><!-- doxytag: member="MACOSX_CORE" ref="ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d" args="" -->MACOSX_CORE</em>&nbsp;</td><td>
<p>Macintosh OS-X Core Audio API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469"></a><!-- doxytag: member="WINDOWS_ASIO" ref="ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469" args="" -->WINDOWS_ASIO</em>&nbsp;</td><td>
<p>The Steinberg Audio Stream I/O API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931"></a><!-- doxytag: member="WINDOWS_DS" ref="ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931" args="" -->WINDOWS_DS</em>&nbsp;</td><td>
<p>The Microsoft Direct Sound API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1"></a><!-- doxytag: member="RTAUDIO_DUMMY" ref="ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1" args="" -->RTAUDIO_DUMMY</em>&nbsp;</td><td>
<p>A compilable but non-functional API. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="afd0bfa26deae9804e18faff59d0273d9"></a><!-- doxytag: member="RtAudio::RtAudio" ref="afd0bfa26deae9804e18faff59d0273d9" args="(RtAudio::Api api=UNSPECIFIED)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">RtAudio::RtAudio </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a>&nbsp;</td>
<td class="paramname"> <em>api</em> = <code>UNSPECIFIED</code></td>
<td>&nbsp;)&nbsp;</td>
<td> throw ()</td>
</tr>
</table>
</div>
<div class="memdoc">

<p>The class constructor. </p>
<p>The constructor performs minor initialization tasks. No exceptions can be thrown.</p>
<p>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). </p>

</div>
</div>
<a class="anchor" id="aa8a9716fd64680657ef69c9465442a2f"></a><!-- doxytag: member="RtAudio::~RtAudio" ref="aa8a9716fd64680657ef69c9465442a2f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">RtAudio::~RtAudio </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> throw ()</td>
</tr>
</table>
</div>
<div class="memdoc">

<p>The destructor. </p>
<p>If a stream is running or open, it will be stopped and closed automatically. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae266ffad2ef428d0b2c6c262d391ce26"></a><!-- doxytag: member="RtAudio::getCompiledApi" ref="ae266ffad2ef428d0b2c6c262d391ce26" args="(std::vector&lt; RtAudio::Api &gt; &amp;apis)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void RtAudio::getCompiledApi </td>
<td>(</td>
<td class="paramtype">std::vector&lt; <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> &gt; &amp;&nbsp;</td>
<td class="paramname"> <em>apis</em></td>
<td>&nbsp;)&nbsp;</td>
<td> throw ()<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>A static function to determine the available compiled audio APIs. </p>
<p>The values returned in the std::vector can be compared against the enumerated list values. Note that there can be more than one API compiled for certain operating systems. </p>

</div>
</div>
<a class="anchor" id="a747ce2d73803641bbb66d6e78092aa1a"></a><!-- doxytag: member="RtAudio::getDeviceCount" ref="a747ce2d73803641bbb66d6e78092aa1a" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getDeviceCount </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>A public function that queries for the number of audio devices available. </p>
<p>This function performs a system query of available devices each time it is called, thus supporting devices connected <em>after</em> instantiation. If a system error occurs during processing, a warning will be issued. </p>

</div>
</div>
<a class="anchor" id="a02d7ff44ad1d7eae22283a052f3dfda8"></a><!-- doxytag: member="RtAudio::getDeviceInfo" ref="a02d7ff44ad1d7eae22283a052f3dfda8" args="(unsigned int device)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> RtAudio::getDeviceInfo </td>
<td>(</td>
<td class="paramtype">unsigned int&nbsp;</td>
<td class="paramname"> <em>device</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure for a specified device number. </p>
<p>Any device integer between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1 is valid. If an invalid argument is provided, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. If a device is busy or otherwise unavailable, the structure member "probed" will have a value of "false" and all other members are undefined. If the specified device is the current default input or output device, the corresponding "isDefault" member will have a value of "true". </p>

</div>
</div>
<a class="anchor" id="a3a3f3dbe13ea696b521e49cdaaa357bc"></a><!-- doxytag: member="RtAudio::getDefaultOutputDevice" ref="a3a3f3dbe13ea696b521e49cdaaa357bc" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getDefaultOutputDevice </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>A function that returns the index of the default output device. </p>
<p>If the underlying audio API does not provide a "default
device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream. </p>

</div>
</div>
<a class="anchor" id="aad8b94edd3cd379ee300b125750ac6ce"></a><!-- doxytag: member="RtAudio::getDefaultInputDevice" ref="aad8b94edd3cd379ee300b125750ac6ce" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getDefaultInputDevice </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>A function that returns the index of the default input device. </p>
<p>If the underlying audio API does not provide a "default
device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream. </p>

</div>
</div>
<a class="anchor" id="afacc99740fa4c5606fb35467cdea6da8"></a><!-- doxytag: member="RtAudio::openStream" ref="afacc99740fa4c5606fb35467cdea6da8" args="(RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::openStream </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *&nbsp;</td>
<td class="paramname"> <em>outputParameters</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *&nbsp;</td>
<td class="paramname"> <em>inputParameters</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a>&nbsp;</td>
<td class="paramname"> <em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&nbsp;</td>
<td class="paramname"> <em>sampleRate</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int *&nbsp;</td>
<td class="paramname"> <em>bufferFrames</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a>&nbsp;</td>
<td class="paramname"> <em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>userData</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *&nbsp;</td>
<td class="paramname"> <em>options</em> = <code>NULL</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>A public function for opening a stream with the specified parameters. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if a stream cannot be opened with the specified parameters or an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) is thrown if any invalid device ID or channel number parameters are specified.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>outputParameters</em>&nbsp;</td><td>Specifies output stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For input-only streams, this argument should be NULL. The device ID is an index value between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>inputParameters</em>&nbsp;</td><td>Specifies input stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For output-only streams, this argument should be NULL. The device ID is an index value between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>An RtAudioFormat specifying the desired sample data format. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>sampleRate</em>&nbsp;</td><td>The desired sample rate (sample frames per second). </td></tr>
<tr><td valign="top"></td><td valign="top"><em>*bufferFrames</em>&nbsp;</td><td>A pointer to a value indicating the desired internal buffer size in sample frames. The actual value used by the device is returned via the same pointer. A value of zero can be specified, in which case the lowest allowable value is determined. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>callback</em>&nbsp;</td><td>A client-defined function that will be invoked when input data is available and/or output data is needed. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>userData</em>&nbsp;</td><td>An optional pointer to data that can be accessed from within the callback function. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>An optional pointer to a structure containing various global stream options, including a list of OR'ed RtAudioStreamFlags and a suggested number of stream buffers that can be used to control stream latency. More buffers typically result in more robust performance, though at a cost of greater latency. If a value of zero is specified, a system-specific median value is chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the lowest allowable value is used. The actual value used is returned via the structure argument. The parameter is API dependent. </td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="a90d599002ad32cf250a4cb866f2cc93a"></a><!-- doxytag: member="RtAudio::closeStream" ref="a90d599002ad32cf250a4cb866f2cc93a" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::closeStream </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>A function that closes a stream and frees any associated stream memory. </p>
<p>If a stream is not open, this function issues a warning and returns (no exception is thrown). </p>

</div>
</div>
<a class="anchor" id="aec017a89629ccef66a90b60be22a2f80"></a><!-- doxytag: member="RtAudio::startStream" ref="aec017a89629ccef66a90b60be22a2f80" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::startStream </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>A function that starts a stream. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already running. </p>

</div>
</div>
<a class="anchor" id="af4c241ff86936ecc8108f0d9dfe3efdd"></a><!-- doxytag: member="RtAudio::stopStream" ref="af4c241ff86936ecc8108f0d9dfe3efdd" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::stopStream </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Stop a stream, allowing any samples remaining in the output queue to be played. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped. </p>

</div>
</div>
<a class="anchor" id="ad0586b47cd6bb9591a80b4052815991f"></a><!-- doxytag: member="RtAudio::abortStream" ref="ad0586b47cd6bb9591a80b4052815991f" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::abortStream </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Stop a stream, discarding any samples remaining in the input/output queue. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped. </p>

</div>
</div>
<a class="anchor" id="a344e59a62353c5791db4621b985cb2ca"></a><!-- doxytag: member="RtAudio::getStreamTime" ref="a344e59a62353c5791db4621b985cb2ca" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double RtAudio::getStreamTime </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Returns the number of elapsed seconds since the stream was started. </p>
<p>If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. </p>

</div>
</div>
<a class="anchor" id="a843c989d9f501c71bc2f2c5ca18df9f3"></a><!-- doxytag: member="RtAudio::getStreamLatency" ref="a843c989d9f501c71bc2f2c5ca18df9f3" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long RtAudio::getStreamLatency </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Returns the internal stream latency in sample frames. </p>
<p>The stream latency refers to delay in audio input and/or output caused by internal buffering by the audio system and/or hardware. For duplex streams, the returned value will represent the sum of the input and output latencies. If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. If the API does not report latency, the return value will be zero. </p>

</div>
</div>
<a class="anchor" id="a28214b8b05d60b45c24ee6fae7b2a0b5"></a><!-- doxytag: member="RtAudio::getStreamSampleRate" ref="a28214b8b05d60b45c24ee6fae7b2a0b5" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getStreamSampleRate </td>
<td>(</td>
<td class="paramtype">void&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Returns actual sample rate in use by the stream. </p>
<p>On some systems, the sample rate used may be slightly different than that specified in the stream parameters. If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="RtAudio_8h_source.html">RtAudio.h</a></li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 40
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/classRtError-members.html View File

@@ -0,0 +1,40 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtError Member List</h1>This is the complete list of members for <a class="el" href="classRtError.html">RtError</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba">DEBUG_WARNING</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b">DRIVER_ERROR</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50">getMessage</a>(void) const </td><td><a class="el" href="classRtError.html">RtError</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#a3e316dc9b9b41fe2f64cabf34beb4fe7">getType</a>(void) const </td><td><a class="el" href="classRtError.html">RtError</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1">INVALID_DEVICE</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6">INVALID_PARAMETER</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc">INVALID_USE</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e">MEMORY_ERROR</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82">NO_DEVICES_FOUND</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc">printMessage</a>(void) const </td><td><a class="el" href="classRtError.html">RtError</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#aa479a305ccbe56be0fd9137b9b405a37">RtError</a>(const std::string &amp;message, Type type=RtError::UNSPECIFIED)</td><td><a class="el" href="classRtError.html">RtError</a></td><td><code> [inline]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b">SYSTEM_ERROR</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6">THREAD_ERROR</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">Type</a> enum name</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6">UNSPECIFIED</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">WARNING</a> enum value</td><td><a class="el" href="classRtError.html">RtError</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#aeb843b7a7785d66061c61ebfc29e7e9d">what</a>(void) const </td><td><a class="el" href="classRtError.html">RtError</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="classRtError.html#a6793e03386e7e69ffafb65a296dfa48c">~RtError</a>(void)</td><td><a class="el" href="classRtError.html">RtError</a></td><td><code> [inline, virtual]</code></td></tr>
</table></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 127
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/classRtError.html View File

@@ -0,0 +1,127 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtError Class Reference</h1><!-- doxytag: class="RtError" -->
<p>Exception handling class for <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> &amp; RtMidi.
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="RtError_8h_source.html">RtError.h</a>&gt;</code></p>

<p><a href="classRtError-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">Type</a> { <br/>
&nbsp;&nbsp;<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">WARNING</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba">DEBUG_WARNING</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6">UNSPECIFIED</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82">NO_DEVICES_FOUND</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1">INVALID_DEVICE</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e">MEMORY_ERROR</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6">INVALID_PARAMETER</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc">INVALID_USE</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b">DRIVER_ERROR</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b">SYSTEM_ERROR</a>,
<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6">THREAD_ERROR</a>
<br/>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Defined <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> types. </p>
<a href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa479a305ccbe56be0fd9137b9b405a37"></a><!-- doxytag: member="RtError::RtError" ref="aa479a305ccbe56be0fd9137b9b405a37" args="(const std::string &amp;message, Type type=RtError::UNSPECIFIED)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtError.html#aa479a305ccbe56be0fd9137b9b405a37">RtError</a> (const std::string &amp;message, <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">Type</a> type=RtError::UNSPECIFIED) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6793e03386e7e69ffafb65a296dfa48c"></a><!-- doxytag: member="RtError::~RtError" ref="a6793e03386e7e69ffafb65a296dfa48c" args="(void)" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtError.html#a6793e03386e7e69ffafb65a296dfa48c">~RtError</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a251dcdac396c998c91706dd2dd3b8bfc"></a><!-- doxytag: member="RtError::printMessage" ref="a251dcdac396c998c91706dd2dd3b8bfc" args="(void) const " -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc">printMessage</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Prints thrown error message to stderr. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e316dc9b9b41fe2f64cabf34beb4fe7"></a><!-- doxytag: member="RtError::getType" ref="a3e316dc9b9b41fe2f64cabf34beb4fe7" args="(void) const " -->
virtual const <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">Type</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtError.html#a3e316dc9b9b41fe2f64cabf34beb4fe7">getType</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the thrown error message type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd067ba6b46edd37f989cad02cd70b50"></a><!-- doxytag: member="RtError::getMessage" ref="afd067ba6b46edd37f989cad02cd70b50" args="(void) const " -->
virtual const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50">getMessage</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the thrown error message string. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb843b7a7785d66061c61ebfc29e7e9d"></a><!-- doxytag: member="RtError::what" ref="aeb843b7a7785d66061c61ebfc29e7e9d" args="(void) const " -->
virtual const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtError.html#aeb843b7a7785d66061c61ebfc29e7e9d">what</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the thrown error message as a c-style string. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Exception handling class for <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> &amp; RtMidi. </p>
<p>The <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> class is quite simple but it does allow errors to be "caught" by <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">RtError::Type</a>. See the <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> and RtMidi documentation to know which methods can throw an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a>. </p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="ab04667aae01bffc354a9ac6bda6903ac"></a><!-- doxytag: member="RtError::Type" ref="ab04667aae01bffc354a9ac6bda6903ac" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">RtError::Type</a></td>
</tr>
</table>
</div>
<div class="memdoc">

<p>Defined <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> types. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398"></a><!-- doxytag: member="WARNING" ref="ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398" args="" -->WARNING</em>&nbsp;</td><td>
<p>A non-critical error. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba"></a><!-- doxytag: member="DEBUG_WARNING" ref="ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba" args="" -->DEBUG_WARNING</em>&nbsp;</td><td>
<p>A non-critical error which might be useful for debugging. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6"></a><!-- doxytag: member="UNSPECIFIED" ref="ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6" args="" -->UNSPECIFIED</em>&nbsp;</td><td>
<p>The default, unspecified error type. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82"></a><!-- doxytag: member="NO_DEVICES_FOUND" ref="ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82" args="" -->NO_DEVICES_FOUND</em>&nbsp;</td><td>
<p>No devices found on system. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1"></a><!-- doxytag: member="INVALID_DEVICE" ref="ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1" args="" -->INVALID_DEVICE</em>&nbsp;</td><td>
<p>An invalid device ID was specified. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e"></a><!-- doxytag: member="MEMORY_ERROR" ref="ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e" args="" -->MEMORY_ERROR</em>&nbsp;</td><td>
<p>An error occured during memory allocation. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6"></a><!-- doxytag: member="INVALID_PARAMETER" ref="ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6" args="" -->INVALID_PARAMETER</em>&nbsp;</td><td>
<p>An invalid parameter was specified to a function. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc"></a><!-- doxytag: member="INVALID_USE" ref="ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc" args="" -->INVALID_USE</em>&nbsp;</td><td>
<p>The function was called incorrectly. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b"></a><!-- doxytag: member="DRIVER_ERROR" ref="ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b" args="" -->DRIVER_ERROR</em>&nbsp;</td><td>
<p>A system driver error occured. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b"></a><!-- doxytag: member="SYSTEM_ERROR" ref="ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b" args="" -->SYSTEM_ERROR</em>&nbsp;</td><td>
<p>A system error occured. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6"></a><!-- doxytag: member="THREAD_ERROR" ref="ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6" args="" -->THREAD_ERROR</em>&nbsp;</td><td>
<p>A thread error occured. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="RtError_8h_source.html">RtError.h</a></li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 27
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/classes.html View File

@@ -0,0 +1,27 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>Class Index</h1><div class="qindex"><a class="qindex" href="#letter_D">D</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_R">R</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_S">S</a></div>
<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr><td><a name="letter_D"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;D&nbsp;&nbsp;</div></td></tr></table>
</td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;R&nbsp;&nbsp;</div></td></tr></table>
</td><td><a class="el" href="classRtError.html">RtError</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a>&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="classRtAudio.html">RtAudio</a>&nbsp;&nbsp;&nbsp;</td><td><a name="letter_S"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;S&nbsp;&nbsp;</div></td></tr></table>
</td></tr></table><div class="qindex"><a class="qindex" href="#letter_D">D</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_R">R</a>&nbsp;|&nbsp;<a class="qindex" href="#letter_S">S</a></div>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 50
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/compiling.html View File

@@ -0,0 +1,50 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="compiling">Debugging &amp; Compiling </a></h1><h2><a class="anchor" id="debug">
Debugging</a></h2>
<p>If you are having problems getting <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> to run on your system, make sure to pass a value of <em>true</em> to the <a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">RtAudio::showWarnings()</a> function (this is the default setting). A variety of warning messages will be displayed which may help in determining the problem. Also, try using the programs included in the <code>tests</code> directory. The program <code>audioprobe</code> displays the queried capabilities of all hardware devices found for all APIs compiled. When using the ALSA and JACK APIs, further information can be displayed by defining the preprocessor definition __RTAUDIO_DEBUG__.</p>
<h2><a class="anchor" id="compile">
Compiling</a></h2>
<p>In order to compile <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement: </p>
<table class="doxtable" border="2" cols="5" width="100%">
<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></tr>
<tr>
<td>Linux </td><td>ALSA </td><td>RtApiAlsa </td><td>__LINUX_ALSA__ </td><td><code>asound, pthread</code> </td><td><code>g++ -Wall -D__LINUX_ALSA__ -o audioprobe audioprobe.cpp RtAudio.cpp -lasound -lpthread</code> </td></tr>
<tr>
<td>Linux </td><td>PulseAudio </td><td>RtApiPulse </td><td>__LINUX_PULSE__ </td><td><code>pthread</code> </td><td><code>g++ -Wall -D__LINUX_PULSE__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread</code> </td></tr>
<tr>
<td>Linux </td><td>OSS </td><td>RtApiOss </td><td>__LINUX_OSS__ </td><td><code>pthread</code> </td><td><code>g++ -Wall -D__LINUX_OSS__ -o audioprobe audioprobe.cpp RtAudio.cpp -lpthread</code> </td></tr>
<tr>
<td>Linux or Macintosh OS-X </td><td>Jack Audio Server </td><td>RtApiJack </td><td>__UNIX_JACK__ </td><td><code>jack, pthread</code> </td><td><p class="starttd"><code>g++ -Wall -D__UNIX_JACK__ -o audioprobe audioprobe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread</code> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>Macintosh OS-X </td><td>CoreAudio </td><td>RtApiCore </td><td>__MACOSX_CORE__ </td><td><code>pthread, CoreAudio</code> </td><td><code>g++ -Wall -D__MACOSX_CORE__ -o audioprobe audioprobe.cpp RtAudio.cpp -framework CoreAudio -lpthread</code> </td></tr>
<tr>
<td>Windows </td><td>Direct Sound </td><td>RtApiDs </td><td>__WINDOWS_DS__ </td><td><code>dsound.lib (ver. 5.0 or higher), multithreaded</code> </td><td><em>compiler specific</em> </td></tr>
<tr>
<td>Windows </td><td>ASIO </td><td>RtApiAsio </td><td>__WINDOWS_ASIO__ </td><td><em>various ASIO header and source files</em> </td><td><em>compiler specific</em> </td></tr>
</table>
<p>The example compiler statements above could be used to compile the <code>audioprobe.cpp</code> example file, assuming that <code>audioprobe.cpp</code>, <code><a class="el" href="RtAudio_8h.html">RtAudio.h</a></code>, <code><a class="el" href="RtError_8h_source.html">RtError.h</a></code>, and <code>RtAudio.cpp</code> all exist in the same directory. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 532
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/doxygen.css View File

@@ -0,0 +1,532 @@
/* The standard CSS for doxygen */

body, table, div, p, dl {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 12px;
}

/* @group Heading Levels */

h1 {
text-align: center;
font-size: 150%;
}

h2 {
font-size: 120%;
}

h3 {
font-size: 100%;
}

dt {
font-weight: bold;
}

div.multicol {
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
-moz-column-count: 3;
-webkit-column-count: 3;
}

p.startli, p.startdd, p.starttd {
margin-top: 2px;
}

p.endli {
margin-bottom: 0px;
}

p.enddd {
margin-bottom: 4px;
}

p.endtd {
margin-bottom: 2px;
}

/* @end */

caption {
font-weight: bold;
}

span.legend {
font-size: 70%;
text-align: center;
}

h3.version {
font-size: 90%;
text-align: center;
}

div.qindex, div.navtab{
background-color: #e8eef2;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
padding: 2px;
}

div.qindex, div.navpath {
width: 100%;
line-height: 140%;
}

div.navtab {
margin-right: 15px;
}

/* @group Link Styling */

a {
color: #153788;
font-weight: normal;
text-decoration: none;
}

.contents a:visited {
color: #1b77c5;
}

a:hover {
text-decoration: underline;
}

a.qindex {
font-weight: bold;
}

a.qindexHL {
font-weight: bold;
background-color: #6666cc;
color: #ffffff;
border: 1px double #9295C2;
}

.contents a.qindexHL:visited {
color: #ffffff;
}

a.el {
font-weight: bold;
}

a.elRef {
}

a.code {
color: #3030f0;
}

a.codeRef {
color: #3030f0;
}

/* @end */

dl.el {
margin-left: -1cm;
}

.fragment {
font-family: monospace, fixed;
font-size: 105%;
}

pre.fragment {
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
padding: 4px 6px;
margin: 4px 8px 4px 2px;
overflow: auto;
word-wrap: break-word;
font-size: 9pt;
line-height: 125%;
}

div.ah {
background-color: black;
font-weight: bold;
color: #ffffff;
margin-bottom: 3px;
margin-top: 3px
}

div.groupHeader {
margin-left: 16px;
margin-top: 12px;
margin-bottom: 6px;
font-weight: bold;
}

div.groupText {
margin-left: 16px;
font-style: italic;
}

body {
background: white;
color: black;
margin-right: 20px;
margin-left: 20px;
}

td.indexkey {
background-color: #e8eef2;
font-weight: bold;
border: 1px solid #CCCCCC;
margin: 2px 0px 2px 0;
padding: 2px 10px;
}

td.indexvalue {
background-color: #e8eef2;
border: 1px solid #CCCCCC;
padding: 2px 10px;
margin: 2px 0px;
}

tr.memlist {
background-color: #f0f0f0;
}

p.formulaDsp {
text-align: center;
}

img.formulaDsp {
}

img.formulaInl {
vertical-align: middle;
}

div.center {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}

div.center img {
border: 0px;
}

img.footer {
border: 0px;
vertical-align: middle;
}

/* @group Code Colorization */

span.keyword {
color: #008000
}

span.keywordtype {
color: #604020
}

span.keywordflow {
color: #e08000
}

span.comment {
color: #800000
}

span.preprocessor {
color: #806020
}

span.stringliteral {
color: #002080
}

span.charliteral {
color: #008080
}

span.vhdldigit {
color: #ff00ff
}

span.vhdlchar {
color: #000000
}

span.vhdlkeyword {
color: #700070
}

span.vhdllogic {
color: #ff0000
}

/* @end */

.search {
color: #003399;
font-weight: bold;
}

form.search {
margin-bottom: 0px;
margin-top: 0px;
}

input.search {
font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #e8eef2;
}

td.tiny {
font-size: 75%;
}

.dirtab {
padding: 4px;
border-collapse: collapse;
border: 1px solid #84b0c7;
}

th.dirtab {
background: #e8eef2;
font-weight: bold;
}

hr {
height: 0;
border: none;
border-top: 1px solid #666;
}

/* @group Member Descriptions */

.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
background-color: #FAFAFA;
border: none;
margin: 4px;
padding: 1px 0 0 8px;
}

.mdescLeft, .mdescRight {
padding: 0px 8px 4px 8px;
color: #555;
}

.memItemLeft, .memItemRight, .memTemplParams {
border-top: 1px solid #ccc;
}

.memItemLeft, .memTemplItemLeft {
white-space: nowrap;
}

.memTemplParams {
color: #606060;
white-space: nowrap;
}

/* @end */

/* @group Member Details */

/* Styles for detailed member documentation */

.memtemplate {
font-size: 80%;
color: #606060;
font-weight: normal;
margin-left: 3px;
}

.memnav {
background-color: #e8eef2;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}

.memitem {
padding: 0;
margin-bottom: 10px;
}

.memname {
white-space: nowrap;
font-weight: bold;
}

.memproto, .memdoc {
border: 1px solid #84b0c7;
}

.memproto {
padding: 0;
background-color: #d5e1e8;
font-weight: bold;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-moz-border-radius-topleft: 8px;
-moz-border-radius-topright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;

}

.memdoc {
padding: 2px 5px;
background-color: #eef3f5;
border-top-width: 0;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-moz-border-radius-bottomleft: 8px;
-moz-border-radius-bottomright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
}

.paramkey {
text-align: right;
}

.paramtype {
white-space: nowrap;
}

.paramname {
color: #602020;
white-space: nowrap;
}
.paramname em {
font-style: normal;
}

/* @end */

/* @group Directory (tree) */

/* for the tree view */

.ftvtree {
font-family: sans-serif;
margin: 0.5em;
}

/* these are for tree view when used as main index */

.directory {
font-size: 9pt;
font-weight: bold;
}

.directory h3 {
margin: 0px;
margin-top: 1em;
font-size: 11pt;
}

/*
The following two styles can be used to replace the root node title
with an image of your choice. Simply uncomment the next two styles,
specify the name of your image and be sure to set 'height' to the
proper pixel height of your image.
*/

/*
.directory h3.swap {
height: 61px;
background-repeat: no-repeat;
background-image: url("yourimage.gif");
}
.directory h3.swap span {
display: none;
}
*/

.directory > h3 {
margin-top: 0;
}

.directory p {
margin: 0px;
white-space: nowrap;
}

.directory div {
display: none;
margin: 0px;
}

.directory img {
vertical-align: -30%;
}

/* these are for tree view when not used as main index */

.directory-alt {
font-size: 100%;
font-weight: bold;
}

.directory-alt h3 {
margin: 0px;
margin-top: 1em;
font-size: 11pt;
}

.directory-alt > h3 {
margin-top: 0;
}

.directory-alt p {
margin: 0px;
white-space: nowrap;
}

.directory-alt div {
display: none;
margin: 0px;
}

.directory-alt img {
vertical-align: -30%;
}

/* @end */

address {
font-style: normal;
color: #333;
}

table.doxtable {
border-collapse:collapse;
}

table.doxtable td, table.doxtable th {
border: 1px solid #153788;
padding: 3px 7px 2px;
}

table.doxtable th {
background-color: #254798;
color: #FFFFFF;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
}


BIN
source/backend/engine/rtaudio-4.0.11/doc/html/doxygen.png View File

Before After
Width: 100  |  Height: 45  |  Size: 1.3KB

+ 90
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/duplex.html View File

@@ -0,0 +1,90 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="duplex">Duplex Mode </a></h1><p>Finally, it is easy to use <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> for simultaneous audio input/output, or duplex operation. In this example, we simply pass the input data back to the output.</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &quot;<a class="code" href="RtAudio_8h.html">RtAudio.h</a>&quot;</span>
<span class="preprocessor">#include &lt;iostream&gt;</span>
<span class="preprocessor">#include &lt;cstdlib&gt;</span>
<span class="preprocessor">#include &lt;cstring&gt;</span>

<span class="comment">// Pass-through function.</span>
<span class="keywordtype">int</span> inout( <span class="keywordtype">void</span> *outputBuffer, <span class="keywordtype">void</span> *inputBuffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nBufferFrames,
<span class="keywordtype">double</span> streamTime, <a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> status, <span class="keywordtype">void</span> *data )
{
<span class="comment">// Since the number of input and output channels is equal, we can do</span>
<span class="comment">// a simple buffer copy operation here.</span>
<span class="keywordflow">if</span> ( status ) std::cout &lt;&lt; <span class="stringliteral">&quot;Stream over/underflow detected.&quot;</span> &lt;&lt; std::endl;

<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *bytes = (<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *) data;
memcpy( outputBuffer, inputBuffer, *bytes );
<span class="keywordflow">return</span> 0;
}

<span class="keywordtype">int</span> main()
{
<a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> adac;
<span class="keywordflow">if</span> ( adac.<a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>() &lt; 1 ) {
std::cout &lt;&lt; <span class="stringliteral">&quot;\nNo audio devices found!\n&quot;</span>;
exit( 0 );
}

<span class="comment">// Set the same number of channels for both input and output.</span>
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferBytes, bufferFrames = 512;
<a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> iParams, oParams;
iParams.<a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a> = 0; <span class="comment">// first available device</span>
iParams.<a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a> = 2;
oParams.<a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a> = 0; <span class="comment">// first available device</span>
oParams.<a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a> = 2;

<span class="keywordflow">try</span> {
adac.<a class="code" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( &amp;oParams, &amp;iParams, RTAUDIO_SINT32, 44100, &amp;bufferFrames, &amp;inout, (<span class="keywordtype">void</span> *)&amp;bufferBytes );
}
<span class="keywordflow">catch</span> ( <a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a>&amp; e ) {
e.<a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc" title="Prints thrown error message to stderr.">printMessage</a>();
exit( 0 );
}

bufferBytes = bufferFrames * 2 * 4;

<span class="keywordflow">try</span> {
adac.<a class="code" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">startStream</a>();

<span class="keywordtype">char</span> input;
std::cout &lt;&lt; <span class="stringliteral">&quot;\nRunning ... press &lt;enter&gt; to quit.\n&quot;</span>;
std::cin.get(input);

<span class="comment">// Stop the stream.</span>
adac.<a class="code" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">stopStream</a>();
}
<span class="keywordflow">catch</span> ( <a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a>&amp; e ) {
e.<a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc" title="Prints thrown error message to stderr.">printMessage</a>();
<span class="keywordflow">goto</span> cleanup;
}

cleanup:
<span class="keywordflow">if</span> ( adac.<a class="code" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">isStreamOpen</a>() ) adac.<a class="code" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">closeStream</a>();

<span class="keywordflow">return</span> 0;
}
</pre></div><p>In this example, audio recorded by the stream input will be played out during the next round of audio processing.</p>
<p>Note that a duplex stream can make use of two different devices (except when using the Linux Jack and Windows ASIO APIs). However, this may cause timing problems due to possible device clock variations, unless a common external "sync" is provided. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 24
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/errors.html View File

@@ -0,0 +1,24 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="errors">Error Handling </a></h1><p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> makes restrained use of C++ exceptions. That is, exceptions are thrown only when system errors occur that prevent further class operation or when the user makes invalid function calls. In other cases, a warning message may be displayed and an appropriate value is returned. For example, if a system error occurs when processing the <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">RtAudio::getDeviceCount()</a> function, the return value is zero. In such a case, the user cannot expect to make use of most other <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> functions because no devices are available (and thus a stream cannot be opened). A client can call the function <a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77" title="Specify whether warning messages should be printed to stderr.">RtAudio::showWarnings()</a> with a boolean argument to enable or disable the printing of warning messages to <code>stderr</code>. By default, warning messages are displayed. There is a protected <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> method, error(), that can be modified to globally control how these messages are handled and reported. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 25
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/files.html View File

@@ -0,0 +1,25 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>File List</h1>Here is a list of all documented files with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="RtAudio_8h.html">RtAudio.h</a> <a href="RtAudio_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><b>RtError.h</b> <a href="RtError_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
</table>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 306
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/functions.html View File

@@ -0,0 +1,306 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="tabs">
<ul>
<li class="current"><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
<li><a href="functions_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="#index_a"><span>a</span></a></li>
<li><a href="#index_c"><span>c</span></a></li>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_f"><span>f</span></a></li>
<li><a href="#index_g"><span>g</span></a></li>
<li><a href="#index_i"><span>i</span></a></li>
<li><a href="#index_l"><span>l</span></a></li>
<li><a href="#index_m"><span>m</span></a></li>
<li><a href="#index_n"><span>n</span></a></li>
<li><a href="#index_o"><span>o</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_r"><span>r</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li><a href="#index_t"><span>t</span></a></li>
<li><a href="#index_u"><span>u</span></a></li>
<li><a href="#index_w"><span>w</span></a></li>
<li><a href="#index_~"><span>~</span></a></li>
</ul>
</div>
<div class="contents">
Here is a list of all documented class members with links to the class documentation for each member:

<h3><a class="anchor" id="index_a">- a -</a></h3><ul>
<li>abortStream()
: <a class="el" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f">RtAudio</a>
</li>
<li>Api
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio</a>
</li>
</ul>


<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
<li>closeStream()
: <a class="el" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a">RtAudio</a>
</li>
</ul>


<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
<li>DEBUG_WARNING
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba">RtError</a>
</li>
<li>deviceId
: <a class="el" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">RtAudio::StreamParameters</a>
</li>
<li>DRIVER_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b">RtError</a>
</li>
<li>duplexChannels
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">RtAudio::DeviceInfo</a>
</li>
</ul>


<h3><a class="anchor" id="index_f">- f -</a></h3><ul>
<li>firstChannel
: <a class="el" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">RtAudio::StreamParameters</a>
</li>
<li>flags
: <a class="el" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">RtAudio::StreamOptions</a>
</li>
</ul>


<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
<li>getCompiledApi()
: <a class="el" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26">RtAudio</a>
</li>
<li>getCurrentApi()
: <a class="el" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246">RtAudio</a>
</li>
<li>getDefaultInputDevice()
: <a class="el" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce">RtAudio</a>
</li>
<li>getDefaultOutputDevice()
: <a class="el" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc">RtAudio</a>
</li>
<li>getDeviceCount()
: <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a">RtAudio</a>
</li>
<li>getDeviceInfo()
: <a class="el" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8">RtAudio</a>
</li>
<li>getMessage()
: <a class="el" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50">RtError</a>
</li>
<li>getStreamLatency()
: <a class="el" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3">RtAudio</a>
</li>
<li>getStreamSampleRate()
: <a class="el" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5">RtAudio</a>
</li>
<li>getStreamTime()
: <a class="el" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca">RtAudio</a>
</li>
<li>getType()
: <a class="el" href="classRtError.html#a3e316dc9b9b41fe2f64cabf34beb4fe7">RtError</a>
</li>
</ul>


<h3><a class="anchor" id="index_i">- i -</a></h3><ul>
<li>inputChannels
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">RtAudio::DeviceInfo</a>
</li>
<li>INVALID_DEVICE
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1">RtError</a>
</li>
<li>INVALID_PARAMETER
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6">RtError</a>
</li>
<li>INVALID_USE
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc">RtError</a>
</li>
<li>isDefaultInput
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">RtAudio::DeviceInfo</a>
</li>
<li>isDefaultOutput
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">RtAudio::DeviceInfo</a>
</li>
<li>isStreamOpen()
: <a class="el" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f">RtAudio</a>
</li>
<li>isStreamRunning()
: <a class="el" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea">RtAudio</a>
</li>
</ul>


<h3><a class="anchor" id="index_l">- l -</a></h3><ul>
<li>LINUX_ALSA
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">RtAudio</a>
</li>
<li>LINUX_OSS
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">RtAudio</a>
</li>
<li>LINUX_PULSE
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">RtAudio</a>
</li>
</ul>


<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
<li>MACOSX_CORE
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">RtAudio</a>
</li>
<li>MEMORY_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e">RtError</a>
</li>
</ul>


<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
<li>name
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">RtAudio::DeviceInfo</a>
</li>
<li>nativeFormats
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">RtAudio::DeviceInfo</a>
</li>
<li>nChannels
: <a class="el" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">RtAudio::StreamParameters</a>
</li>
<li>NO_DEVICES_FOUND
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82">RtError</a>
</li>
<li>numberOfBuffers
: <a class="el" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">RtAudio::StreamOptions</a>
</li>
</ul>


<h3><a class="anchor" id="index_o">- o -</a></h3><ul>
<li>openStream()
: <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8">RtAudio</a>
</li>
<li>outputChannels
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">RtAudio::DeviceInfo</a>
</li>
</ul>


<h3><a class="anchor" id="index_p">- p -</a></h3><ul>
<li>printMessage()
: <a class="el" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc">RtError</a>
</li>
<li>priority
: <a class="el" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">RtAudio::StreamOptions</a>
</li>
<li>probed
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">RtAudio::DeviceInfo</a>
</li>
</ul>


<h3><a class="anchor" id="index_r">- r -</a></h3><ul>
<li>RtAudio()
: <a class="el" href="classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9">RtAudio</a>
</li>
<li>RTAUDIO_DUMMY
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RtAudio</a>
</li>
<li>RtError()
: <a class="el" href="classRtError.html#aa479a305ccbe56be0fd9137b9b405a37">RtError</a>
</li>
</ul>


<h3><a class="anchor" id="index_s">- s -</a></h3><ul>
<li>sampleRates
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">RtAudio::DeviceInfo</a>
</li>
<li>showWarnings()
: <a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77">RtAudio</a>
</li>
<li>startStream()
: <a class="el" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80">RtAudio</a>
</li>
<li>stopStream()
: <a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd">RtAudio</a>
</li>
<li>streamName
: <a class="el" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">RtAudio::StreamOptions</a>
</li>
<li>SYSTEM_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b">RtError</a>
</li>
</ul>


<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
<li>THREAD_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6">RtError</a>
</li>
<li>Type
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">RtError</a>
</li>
</ul>


<h3><a class="anchor" id="index_u">- u -</a></h3><ul>
<li>UNIX_JACK
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">RtAudio</a>
</li>
<li>UNSPECIFIED
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6">RtError</a>
, <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">RtAudio</a>
</li>
</ul>


<h3><a class="anchor" id="index_w">- w -</a></h3><ul>
<li>WARNING
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">RtError</a>
</li>
<li>what()
: <a class="el" href="classRtError.html#aeb843b7a7785d66061c61ebfc29e7e9d">RtError</a>
</li>
<li>WINDOWS_ASIO
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">RtAudio</a>
</li>
<li>WINDOWS_DS
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">RtAudio</a>
</li>
</ul>


<h3><a class="anchor" id="index_0x7e">- ~ -</a></h3><ul>
<li>~RtAudio()
: <a class="el" href="classRtAudio.html#aa8a9716fd64680657ef69c9465442a2f">RtAudio</a>
</li>
<li>~RtError()
: <a class="el" href="classRtError.html#a6793e03386e7e69ffafb65a296dfa48c">RtError</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 38
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/functions_enum.html View File

@@ -0,0 +1,38 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="tabs">
<ul>
<li><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li class="current"><a href="functions_enum.html"><span>Enumerations</span></a></li>
<li><a href="functions_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
<div class="contents">
&nbsp;<ul>
<li>Api
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio</a>
</li>
<li>Type
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">RtError</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 90
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/functions_eval.html View File

@@ -0,0 +1,90 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="tabs">
<ul>
<li><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
<li class="current"><a href="functions_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
<div class="contents">
&nbsp;<ul>
<li>DEBUG_WARNING
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca20e5a369394d19b704ace17002007eba">RtError</a>
</li>
<li>DRIVER_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca995e97ecf6beeedaba525022a63aec6b">RtError</a>
</li>
<li>INVALID_DEVICE
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acad6064062066fffdba258237a7c2159b1">RtError</a>
</li>
<li>INVALID_PARAMETER
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaa3eabf0f71120beaba94148a1b78fed6">RtError</a>
</li>
<li>INVALID_USE
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8e65f51a3fbdc1a4a1552b3260df36bc">RtError</a>
</li>
<li>LINUX_ALSA
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">RtAudio</a>
</li>
<li>LINUX_OSS
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">RtAudio</a>
</li>
<li>LINUX_PULSE
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">RtAudio</a>
</li>
<li>MACOSX_CORE
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">RtAudio</a>
</li>
<li>MEMORY_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acab4f813e5a36905c89d4081a59497432e">RtError</a>
</li>
<li>NO_DEVICES_FOUND
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaf267eb2d710f33d649ba840eeab6ff82">RtError</a>
</li>
<li>RTAUDIO_DUMMY
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RtAudio</a>
</li>
<li>SYSTEM_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca8947d0a2e2a84ecf3646271844e06a6b">RtError</a>
</li>
<li>THREAD_ERROR
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903acaeb6282f991e2d93ab294a4272fc3f6c6">RtError</a>
</li>
<li>UNIX_JACK
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">RtAudio</a>
</li>
<li>UNSPECIFIED
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca444efd3ccf774b2ba9f9bde70ec71cd6">RtError</a>
, <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">RtAudio</a>
</li>
<li>WARNING
: <a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">RtError</a>
</li>
<li>WINDOWS_ASIO
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">RtAudio</a>
</li>
<li>WINDOWS_DS
: <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">RtAudio</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 107
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/functions_func.html View File

@@ -0,0 +1,107 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="tabs">
<ul>
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
<li><a href="functions_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
<div class="contents">
&nbsp;<ul>
<li>abortStream()
: <a class="el" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f">RtAudio</a>
</li>
<li>closeStream()
: <a class="el" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a">RtAudio</a>
</li>
<li>getCompiledApi()
: <a class="el" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26">RtAudio</a>
</li>
<li>getCurrentApi()
: <a class="el" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246">RtAudio</a>
</li>
<li>getDefaultInputDevice()
: <a class="el" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce">RtAudio</a>
</li>
<li>getDefaultOutputDevice()
: <a class="el" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc">RtAudio</a>
</li>
<li>getDeviceCount()
: <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a">RtAudio</a>
</li>
<li>getDeviceInfo()
: <a class="el" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8">RtAudio</a>
</li>
<li>getMessage()
: <a class="el" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50">RtError</a>
</li>
<li>getStreamLatency()
: <a class="el" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3">RtAudio</a>
</li>
<li>getStreamSampleRate()
: <a class="el" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5">RtAudio</a>
</li>
<li>getStreamTime()
: <a class="el" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca">RtAudio</a>
</li>
<li>getType()
: <a class="el" href="classRtError.html#a3e316dc9b9b41fe2f64cabf34beb4fe7">RtError</a>
</li>
<li>isStreamOpen()
: <a class="el" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f">RtAudio</a>
</li>
<li>isStreamRunning()
: <a class="el" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea">RtAudio</a>
</li>
<li>openStream()
: <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8">RtAudio</a>
</li>
<li>printMessage()
: <a class="el" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc">RtError</a>
</li>
<li>RtAudio()
: <a class="el" href="classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9">RtAudio</a>
</li>
<li>RtError()
: <a class="el" href="classRtError.html#aa479a305ccbe56be0fd9137b9b405a37">RtError</a>
</li>
<li>showWarnings()
: <a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77">RtAudio</a>
</li>
<li>startStream()
: <a class="el" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80">RtAudio</a>
</li>
<li>stopStream()
: <a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd">RtAudio</a>
</li>
<li>what()
: <a class="el" href="classRtError.html#aeb843b7a7785d66061c61ebfc29e7e9d">RtError</a>
</li>
<li>~RtAudio()
: <a class="el" href="classRtAudio.html#aa8a9716fd64680657ef69c9465442a2f">RtAudio</a>
</li>
<li>~RtError()
: <a class="el" href="classRtError.html#a6793e03386e7e69ffafb65a296dfa48c">RtError</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 80
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/functions_vars.html View File

@@ -0,0 +1,80 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="tabs">
<ul>
<li><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
<li><a href="functions_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
<div class="contents">
&nbsp;<ul>
<li>deviceId
: <a class="el" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">RtAudio::StreamParameters</a>
</li>
<li>duplexChannels
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">RtAudio::DeviceInfo</a>
</li>
<li>firstChannel
: <a class="el" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">RtAudio::StreamParameters</a>
</li>
<li>flags
: <a class="el" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">RtAudio::StreamOptions</a>
</li>
<li>inputChannels
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">RtAudio::DeviceInfo</a>
</li>
<li>isDefaultInput
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">RtAudio::DeviceInfo</a>
</li>
<li>isDefaultOutput
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">RtAudio::DeviceInfo</a>
</li>
<li>name
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">RtAudio::DeviceInfo</a>
</li>
<li>nativeFormats
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">RtAudio::DeviceInfo</a>
</li>
<li>nChannels
: <a class="el" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">RtAudio::StreamParameters</a>
</li>
<li>numberOfBuffers
: <a class="el" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">RtAudio::StreamOptions</a>
</li>
<li>outputChannels
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">RtAudio::DeviceInfo</a>
</li>
<li>priority
: <a class="el" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">RtAudio::StreamOptions</a>
</li>
<li>probed
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">RtAudio::DeviceInfo</a>
</li>
<li>sampleRates
: <a class="el" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">RtAudio::DeviceInfo</a>
</li>
<li>streamName
: <a class="el" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">RtAudio::StreamOptions</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 41
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/globals.html View File

@@ -0,0 +1,41 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="tabs">
<ul>
<li class="current"><a href="globals.html"><span>All</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
</ul>
</div>
<div class="contents">
Here is a list of all documented file members with links to the documentation:<ul>
<li>RtAudioCallback
: <a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudio.h</a>
</li>
<li>RtAudioFormat
: <a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudio.h</a>
</li>
<li>RtAudioStreamFlags
: <a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudio.h</a>
</li>
<li>RtAudioStreamStatus
: <a class="el" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806">RtAudio.h</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 25
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/globals_enum.html View File

@@ -0,0 +1,25 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Tutorial</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindexHL" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumerator</a></div>

<p>
<ul>
<li>RtAudioApi
: <a class="el" href="RtAudio_8h.html#a24">RtAudio.h</a></ul>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2006 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 33
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/globals_eval.html View File

@@ -0,0 +1,33 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Tutorial</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindexHL" href="globals_eval.html">Enumerator</a></div>

<p>
<ul>
<li>IRIX_AL
: <a class="el" href="RtAudio_8h.html#a24a20">RtAudio.h</a><li>LINUX_ALSA
: <a class="el" href="RtAudio_8h.html#a24a16">RtAudio.h</a><li>LINUX_JACK
: <a class="el" href="RtAudio_8h.html#a24a18">RtAudio.h</a><li>LINUX_OSS
: <a class="el" href="RtAudio_8h.html#a24a17">RtAudio.h</a><li>MACOSX_CORE
: <a class="el" href="RtAudio_8h.html#a24a19">RtAudio.h</a><li>RTAUDIO_DUMMY
: <a class="el" href="RtAudio_8h.html#a24a23">RtAudio.h</a><li>UNSPECIFIED
: <a class="el" href="RtAudio_8h.html#a24a15">RtAudio.h</a><li>WINDOWS_ASIO
: <a class="el" href="RtAudio_8h.html#a24a21">RtAudio.h</a><li>WINDOWS_DS
: <a class="el" href="RtAudio_8h.html#a24a22">RtAudio.h</a></ul>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2006 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 41
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/globals_type.html View File

@@ -0,0 +1,41 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="tabs">
<ul>
<li><a href="globals.html"><span>All</span></a></li>
<li class="current"><a href="globals_type.html"><span>Typedefs</span></a></li>
</ul>
</div>
<div class="contents">
&nbsp;<ul>
<li>RtAudioCallback
: <a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudio.h</a>
</li>
<li>RtAudioFormat
: <a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudio.h</a>
</li>
<li>RtAudioStreamFlags
: <a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudio.h</a>
</li>
<li>RtAudioStreamStatus
: <a class="el" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806">RtAudio.h</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 77
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/index.html View File

@@ -0,0 +1,77 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>The <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> Home Page </h1><h3 class="version">4.0.11 </h3><p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows operating systems. <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:</p>
<ul>
<li>
object-oriented C++ design </li>
<li>
simple, common API across all supported platforms </li>
<li>
only one source and two header files for easy inclusion in programming projects </li>
<li>
allow simultaneous multi-api support </li>
<li>
support dynamic connection of devices </li>
<li>
provide extensive audio device parameter control </li>
<li>
allow audio device capability probing </li>
<li>
automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping </li>
</ul>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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 <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> instance. See the <a class="el" href="apinotes.html">API Notes</a> section for information specific to each of the supported audio APIs.</p>
<h2><a class="anchor" id="whatsnew">
What's New (Version 4.0)</a></h2>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> V4 represents a significant rewrite of the code and includes a number of API and functionality changes from previous versions. A partial list of the changes includes:</p>
<ul>
<li>new support for non-interleaved user data</li>
<li>additional input/output parameter specifications, including channel offset</li>
<li>new support for dynamic connection of devices</li>
<li>new support for stream time</li>
<li>revised callback arguments, including separate input and output buffer arguments</li>
<li>revised C++ exception handling</li>
<li>updated support for OSS version 4.0</li>
<li>discontinued support of blocking functionality</li>
<li>discontinued support of SGI</li>
</ul>
<p>Devices are now re-enumerated every time the <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">RtAudio::getDeviceCount()</a>, <a class="el" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">RtAudio::getDeviceInfo()</a>, and <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> functions are called. This allows for the proper identification of hot-pluggable (USB, Firewire, ...) devices that are connected after an <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> instance is created.</p>
<h2><a class="anchor" id="download">
Download</a></h2>
<p>Latest Release (14 June 2012): <a href="http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.11.tar.gz">Version 4.0.11</a></p>
<h2><a class="anchor" id="documentation">
Documentation Links</a></h2>
<ol type="1">
<li><a class="el" href="errors.html">Error Handling</a></li>
<li><a class="el" href="probe.html">Probing Device Capabilities</a></li>
<li><a class="el" href="settings.html">Device Settings</a></li>
<li><a class="el" href="playback.html">Playback</a></li>
<li><a class="el" href="recording.html">Recording</a></li>
<li><a class="el" href="duplex.html">Duplex Mode</a></li>
<li><a class="el" href="multi.html">Using Simultaneous Multiple APIs</a></li>
<li><a class="el" href="compiling.html">Debugging &amp; Compiling</a></li>
<li><a class="el" href="apinotes.html">API Notes</a></li>
<li><a class="el" href="acknowledge.html">Acknowledgements</a></li>
<li><a class="el" href="license.html">License</a></li>
<li><a href="bugs.html">Bug Tracker</a></li>
<li><a href="updates.html">Possible Updates</a></li>
<li><a href="http://sourceforge.net/projects/rtaudio">RtAudio at SourceForge</a> </li>
</ol>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 29
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/license.html View File

@@ -0,0 +1,29 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="license">License </a></h1><p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>: a set of realtime audio i/o C++ classes<br/>
Copyright (c) 2001-2012 Gary P. Scavone</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 25
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/multi.html View File

@@ -0,0 +1,25 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="multi">Using Simultaneous Multiple APIs </a></h1><p>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 <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">RtAudio::WINDOWS_ASIO</a> when attempting to create an instance of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>. If no available devices are found, then an instance of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> with the api argument <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">RtAudio::WINDOWS_DS</a> can be created. Alternately, if no api argument is specified, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will first look for an ASIO instance and then a DirectSound instance (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 <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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 unlikely that the same device could be simultaneously controlled with two different audio APIs.</p>
<p>The static function <a class="el" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26" title="A static function to determine the available compiled audio APIs.">RtAudio::getCompiledApi()</a> is provided to determine the available compiled API support. The function <a class="el" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246" title="Returns the audio API specifier for the current instance of RtAudio.">RtAudio::getCurrentApi()</a> indicates the API selected for a given <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> instance. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 45
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/pages.html View File

@@ -0,0 +1,45 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>Related Pages</h1>Here is a list of all related documentation pages:<ul>
<li><a class="el" href="acknowledge.html">Acknowledgements</a>
</li>
<li><a class="el" href="apinotes.html">API Notes</a>
</li>
<li><a class="el" href="compiling.html">Debugging &amp; Compiling</a>
</li>
<li><a class="el" href="duplex.html">Duplex Mode</a>
</li>
<li><a class="el" href="errors.html">Error Handling</a>
</li>
<li><a class="el" href="license.html">License</a>
</li>
<li><a class="el" href="multi.html">Using Simultaneous Multiple APIs</a>
</li>
<li><a class="el" href="playback.html">Playback</a>
</li>
<li><a class="el" href="probe.html">Probing Device Capabilities</a>
</li>
<li><a class="el" href="recording.html">Recording</a>
</li>
<li><a class="el" href="settings.html">Device Settings</a>
</li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 96
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/playback.html View File

@@ -0,0 +1,96 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="playback">Playback </a></h1><p>In this example, we provide a complete program that demonstrates the use of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> for audio playback. Our program produces a two-channel sawtooth waveform for output.</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &quot;<a class="code" href="RtAudio_8h.html">RtAudio.h</a>&quot;</span>
<span class="preprocessor">#include &lt;iostream&gt;</span>
<span class="preprocessor">#include &lt;cstdlib&gt;</span>

<span class="comment">// Two-channel sawtooth wave generator.</span>
<span class="keywordtype">int</span> saw( <span class="keywordtype">void</span> *outputBuffer, <span class="keywordtype">void</span> *inputBuffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nBufferFrames,
<span class="keywordtype">double</span> streamTime, <a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> status, <span class="keywordtype">void</span> *userData )
{
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, j;
<span class="keywordtype">double</span> *buffer = (<span class="keywordtype">double</span> *) outputBuffer;
<span class="keywordtype">double</span> *lastValues = (<span class="keywordtype">double</span> *) userData;

<span class="keywordflow">if</span> ( status )
std::cout &lt;&lt; <span class="stringliteral">&quot;Stream underflow detected!&quot;</span> &lt;&lt; std::endl;

<span class="comment">// Write interleaved audio data.</span>
<span class="keywordflow">for</span> ( i=0; i&lt;nBufferFrames; i++ ) {
<span class="keywordflow">for</span> ( j=0; j&lt;2; j++ ) {
*buffer++ = lastValues[j];

lastValues[j] += 0.005 * (j+1+(j*0.1));
<span class="keywordflow">if</span> ( lastValues[j] &gt;= 1.0 ) lastValues[j] -= 2.0;
}
}

<span class="keywordflow">return</span> 0;
}

<span class="keywordtype">int</span> main()
{
<a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> dac;
<span class="keywordflow">if</span> ( dac.<a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>() &lt; 1 ) {
std::cout &lt;&lt; <span class="stringliteral">&quot;\nNo audio devices found!\n&quot;</span>;
exit( 0 );
}

<a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> parameters;
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a> = dac.<a class="code" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">getDefaultOutputDevice</a>();
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a> = 2;
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">firstChannel</a> = 0;
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate = 44100;
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferFrames = 256; <span class="comment">// 256 sample frames</span>
<span class="keywordtype">double</span> data[2];

<span class="keywordflow">try</span> {
dac.<a class="code" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( &amp;parameters, NULL, RTAUDIO_FLOAT64,
sampleRate, &amp;bufferFrames, &amp;saw, (<span class="keywordtype">void</span> *)&amp;data );
dac.<a class="code" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">startStream</a>();
}
<span class="keywordflow">catch</span> ( <a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a>&amp; e ) {
e.<a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc" title="Prints thrown error message to stderr.">printMessage</a>();
exit( 0 );
}
<span class="keywordtype">char</span> input;
std::cout &lt;&lt; <span class="stringliteral">&quot;\nPlaying ... press &lt;enter&gt; to quit.\n&quot;</span>;
std::cin.get( input );

<span class="keywordflow">try</span> {
<span class="comment">// Stop the stream</span>
dac.<a class="code" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">stopStream</a>();
}
<span class="keywordflow">catch</span> (<a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a>&amp; e) {
e.<a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc" title="Prints thrown error message to stderr.">printMessage</a>();
}

<span class="keywordflow">if</span> ( dac.<a class="code" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">isStreamOpen</a>() ) dac.<a class="code" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">closeStream</a>();

<span class="keywordflow">return</span> 0;
}
</pre></div><p>We open the stream in exactly the same way as the previous example (except with a data format change) and specify the address of our callback function <em>"saw()"</em>. The callback function will automatically be invoked when the underlying audio system needs data for output. Note that the callback function is called only when the stream is "running" (between calls to the <a class="el" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">RtAudio::startStream()</a> and <a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">RtAudio::stopStream()</a> functions). We can also pass a pointer value to the <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> function that is made available in the callback function. In this way, it is possible to gain access to arbitrary data created in our <em>main()</em> function from within the globally defined callback function.</p>
<p>In this example, we stop the stream with an explicit call to <a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">RtAudio::stopStream()</a>. It is also possible to stop a stream by returning a non-zero value from the callback function. A return value of 1 will cause the stream to finish draining its internal buffers and then halt (equivalent to calling the <a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">RtAudio::stopStream()</a> function). A return value of 2 will cause the stream to stop immediately (equivalent to calling the <a class="el" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f" title="Stop a stream, discarding any samples remaining in the input/output queue.">RtAudio::abortStream()</a> function). </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 74
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/probe.html View File

@@ -0,0 +1,74 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="probe">Probing Device Capabilities </a></h1><p>A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done.</p>
<div class="fragment"><pre class="fragment"><span class="comment">// audioprobe.cpp</span>

<span class="preprocessor">#include &lt;iostream&gt;</span>
<span class="preprocessor">#include &quot;<a class="code" href="RtAudio_8h.html">RtAudio.h</a>&quot;</span>

<span class="keywordtype">int</span> main()
{
<a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> audio;

<span class="comment">// Determine the number of devices available</span>
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> devices = audio.<a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>();

<span class="comment">// Scan through devices for various capabilities</span>
<a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> info;
<span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i&lt;=devices; i++ ) {

info = audio.<a class="code" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">getDeviceInfo</a>( i );

<span class="keywordflow">if</span> ( info.<a class="code" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">probed</a> == <span class="keyword">true</span> ) {
<span class="comment">// Print, for example, the maximum number of output channels for each device</span>
std::cout &lt;&lt; <span class="stringliteral">&quot;device = &quot;</span> &lt;&lt; i;
std::cout &lt;&lt; <span class="stringliteral">&quot;: maximum output channels = &quot;</span> &lt;&lt; info.<a class="code" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">outputChannels</a> &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;
}
}

<span class="keywordflow">return</span> 0;
}
</pre></div><p>The <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure is defined in <a class="el" href="RtAudio_8h.html">RtAudio.h</a> and provides a variety of information useful in assessing the capabilities of a device:</p>
<div class="fragment"><pre class="fragment"> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> {
<span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">probed</a>; <span class="comment">// true if the device capabilities were successfully probed.</span>
std::string <a class="code" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">name</a>; <span class="comment">// Character string device identifier.</span>
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">outputChannels</a>; <span class="comment">// Maximum output channels supported by device.</span>
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">inputChannels</a>; <span class="comment">// Maximum input channels supported by device.</span>
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">duplexChannels</a>; <span class="comment">// Maximum simultaneous input/output channels supported by device.</span>
<span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">isDefaultOutput</a>; <span class="comment">// true if this is the default output device.</span>
<span class="keywordtype">bool</span> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">isDefaultInput</a>; <span class="comment">// true if this is the default input device.</span>
std::vector&lt;unsigned int&gt; <a class="code" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">sampleRates</a>; <span class="comment">// Supported sample rates.</span>
<a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a> <a class="code" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">nativeFormats</a>; <span class="comment">// Bit mask of supported data formats.</span>
};
</pre></div><p>The following data formats are defined and fully supported by <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>:</p>
<div class="fragment"><pre class="fragment"> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8" title="RtAudio data format type.">RtAudioFormat</a>;
<span class="keyword">static</span> <span class="keyword">const</span> RtAudioFormat RTAUDIO_SINT8; <span class="comment">// Signed 8-bit integer</span>
<span class="keyword">static</span> <span class="keyword">const</span> RtAudioFormat RTAUDIO_SINT16; <span class="comment">// Signed 16-bit integer</span>
<span class="keyword">static</span> <span class="keyword">const</span> RtAudioFormat RTAUDIO_SINT24; <span class="comment">// Signed 24-bit integer (lower 3 bytes of 32-bit signed integer.)</span>
<span class="keyword">static</span> <span class="keyword">const</span> RtAudioFormat RTAUDIO_SINT32; <span class="comment">// Signed 32-bit integer</span>
<span class="keyword">static</span> <span class="keyword">const</span> RtAudioFormat RTAUDIO_FLOAT32; <span class="comment">// 32-bit float normalized between +/- 1.0</span>
<span class="keyword">static</span> <span class="keyword">const</span> RtAudioFormat RTAUDIO_FLOAT64; <span class="comment">// 64-bit double normalized between +/- 1.0</span>
</pre></div><p>The <code>nativeFormats</code> member of the <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure is a bit mask of the above formats which are natively supported by the device. However, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will automatically provide format conversion if a particular format is not natively supported. When the <code>probed</code> member of the <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure is false, the remaining structure members are undefined and the device is probably unusable.</p>
<p>Some audio devices may require a minimum channel value greater than one. <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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 <em>NOT</em> possible when the number of channels set by the user is greater than that supported by the device.</p>
<p>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, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> does not rely on the queried values when attempting to open a stream. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 82
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/recording.html View File

@@ -0,0 +1,82 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="recording">Recording </a></h1><p>Using <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> for audio input is almost identical to the way it is used for playback. Here's the blocking playback example rewritten for recording:</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &quot;<a class="code" href="RtAudio_8h.html">RtAudio.h</a>&quot;</span>
<span class="preprocessor">#include &lt;iostream&gt;</span>
<span class="preprocessor">#include &lt;cstdlib&gt;</span>
<span class="preprocessor">#include &lt;cstring&gt;</span>

<span class="keywordtype">int</span> record( <span class="keywordtype">void</span> *outputBuffer, <span class="keywordtype">void</span> *inputBuffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nBufferFrames,
<span class="keywordtype">double</span> streamTime, <a class="code" href="RtAudio_8h.html#a80e306d363583da3b0a1b65d9b57c806" title="RtAudio stream status (over- or underflow) flags.">RtAudioStreamStatus</a> status, <span class="keywordtype">void</span> *userData )
{
<span class="keywordflow">if</span> ( status )
std::cout &lt;&lt; <span class="stringliteral">&quot;Stream overflow detected!&quot;</span> &lt;&lt; std::endl;

<span class="comment">// Do something with the data in the &quot;inputBuffer&quot; buffer.</span>

<span class="keywordflow">return</span> 0;
}

<span class="keywordtype">int</span> main()
{
<a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> adc;
<span class="keywordflow">if</span> ( adc.<a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>() &lt; 1 ) {
std::cout &lt;&lt; <span class="stringliteral">&quot;\nNo audio devices found!\n&quot;</span>;
exit( 0 );
}

<a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> parameters;
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a> = adc.<a class="code" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce" title="A function that returns the index of the default input device.">getDefaultInputDevice</a>();
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a> = 2;
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">firstChannel</a> = 0;
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate = 44100;
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferFrames = 256; <span class="comment">// 256 sample frames</span>

<span class="keywordflow">try</span> {
adc.<a class="code" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( NULL, &amp;parameters, RTAUDIO_SINT16,
sampleRate, &amp;bufferFrames, &amp;record );
adc.<a class="code" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80" title="A function that starts a stream.">startStream</a>();
}
<span class="keywordflow">catch</span> ( <a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a>&amp; e ) {
e.<a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc" title="Prints thrown error message to stderr.">printMessage</a>();
exit( 0 );
}
<span class="keywordtype">char</span> input;
std::cout &lt;&lt; <span class="stringliteral">&quot;\nRecording ... press &lt;enter&gt; to quit.\n&quot;</span>;
std::cin.get( input );

<span class="keywordflow">try</span> {
<span class="comment">// Stop the stream</span>
adc.<a class="code" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd" title="Stop a stream, allowing any samples remaining in the output queue to be played.">stopStream</a>();
}
<span class="keywordflow">catch</span> (<a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a>&amp; e) {
e.<a class="code" href="classRtError.html#a251dcdac396c998c91706dd2dd3b8bfc" title="Prints thrown error message to stderr.">printMessage</a>();
}

<span class="keywordflow">if</span> ( adc.<a class="code" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f" title="Returns true if a stream is open and false if not.">isStreamOpen</a>() ) adc.<a class="code" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a" title="A function that closes a stream and frees any associated stream memory.">closeStream</a>();

<span class="keywordflow">return</span> 0;
}
</pre></div><p>In this example, we pass the address of the stream parameter structure as the second argument of the <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> function and pass a NULL value for the output stream parameters. In this example, the <em>record()</em> callback function performs no specific operations. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 57
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/settings.html View File

@@ -0,0 +1,57 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">


<h1><a class="anchor" id="settings">Device Settings </a></h1><p>The next step in using <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> is to open a stream with particular device and parameter settings.</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &quot;<a class="code" href="RtAudio_8h.html">RtAudio.h</a>&quot;</span>

<span class="keywordtype">int</span> main()
{
<a class="code" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> dac;
<span class="keywordflow">if</span> ( dac.<a class="code" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount</a>() == 0 ) exit( 0 );

<a class="code" href="structRtAudio_1_1StreamParameters.html" title="The structure for specifying input or ouput stream parameters.">RtAudio::StreamParameters</a> parameters;
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a> = dac.<a class="code" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc" title="A function that returns the index of the default output device.">getDefaultOutputDevice</a>();
parameters.<a class="code" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a> = 2;
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate = 44100;
<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferFrames = 256; <span class="comment">// 256 sample frames</span>

<a class="code" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> options;
options.<a class="code" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">flags</a> = RTAUDIO_NONINTERLEAVED;

<span class="keywordflow">try</span> {
dac.<a class="code" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream</a>( &amp;parameters, NULL, RTAUDIO_FLOAT32,
sampleRate, &amp;bufferFrames, &amp;myCallback, NULL, &amp;options );
}
<span class="keywordflow">catch</span> ( <a class="code" href="classRtError.html" title="Exception handling class for RtAudio &amp;amp; RtMidi.">RtError</a>&amp; e ) {
std::cout &lt;&lt; <span class="charliteral">&#39;\n&#39;</span> &lt;&lt; e.<a class="code" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50" title="Returns the thrown error message string.">getMessage</a>() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span> &lt;&lt; std::endl;
exit( 0 );
}
<span class="keywordflow">return</span> 0;
}
</pre></div><p>The <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> function attempts to open a stream with a specified set of parameter values. In the above example, we attempt to open a two channel playback stream using the default output device, 32-bit floating point data, a sample rate of 44100 Hz, and a frame rate of 256 sample frames per output buffer. If the user specifies an invalid parameter value (such as a device id greater than or equal to the number of enumerated devices), an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> is thrown of type = INVALID_USE. If a system error occurs or the device does not support the specified parameter values, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio &amp; RtMidi.">RtError</a> of type = SYSTEM_ERROR is thrown. In either case, a descriptive error message is bundled with the exception and can be queried with the <a class="el" href="classRtError.html#afd067ba6b46edd37f989cad02cd70b50" title="Returns the thrown error message string.">RtError::getMessage()</a> or <a class="el" href="classRtError.html#aeb843b7a7785d66061c61ebfc29e7e9d" title="Returns the thrown error message as a c-style string.">RtError::what()</a> functions.</p>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> 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, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will automatically perform the necessary data format conversion.</p>
<p>The <code>bufferFrames</code> parameter specifies the desired number of sample frames that will be written to and/or read from a device per write/read operation. This parameter can be used to control stream latency though there is no guarantee that the passed value will be that used by a device. In general, a lower <code>bufferFrames</code> value will produce less latency but perhaps less robust performance. A value of zero can be specified, in which case the smallest allowable value will be used. The <code>bufferFrames</code> parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. <code>bufferFrames</code> values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Stream latency can also be controlled via the optional <a class="el" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> member <code>numberOfBuffers</code> (not used in the example above), though this tends to be more system dependent. In particular, the <code>numberOfBuffers</code> parameter is ignored when using the OS-X Core Audio, Jack, and the Windows ASIO APIs.</p>
<p>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, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> does not attempt to query a device's capabilities or use previously reported values when opening a device. Instead, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> simply attempts to set the given parameters on a specified device and then checks whether the setup is successful or not.</p>
<p>The RtAudioCallback parameter above is a pointer to a user-defined function that will be called whenever the audio system is ready for new output data or has new input data to be read. Further details on the use of a callback function are provided in the next section.</p>
<p>Several stream options are available to fine-tune the behavior of an audio stream. In the example above, we specify that data will be written by the user in a <em>non-interleaved</em> format via the <a class="el" href="structRtAudio_1_1StreamOptions.html" title="The structure for specifying stream options.">RtAudio::StreamOptions</a> member <code>flags</code>. That is, all <code>bufferFrames</code> of the first channel should be written consecutively, followed by all <code>bufferFrames</code> of the second channel. By default (when no option is specified), <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> expects data to be written in an <em>interleaved</em> format. </p>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 29
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioDeviceInfo-members.html View File

@@ -0,0 +1,29 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Tutorial</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<h1>RtAudioDeviceInfo Member List</h1>This is the complete list of members for <a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a>, including all inherited members.<p><table>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o4">duplexChannels</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o3">inputChannels</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o6">isDefaultInput</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o5">isDefaultOutput</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o0">name</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o8">nativeFormats</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o2">outputChannels</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o1">probed</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioDeviceInfo.html#o7">sampleRates</a></td><td><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a></td><td></td></tr>
</table><HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2006 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 259
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioDeviceInfo.html View File

@@ -0,0 +1,259 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Tutorial</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<h1>RtAudioDeviceInfo Struct Reference</h1><!-- doxytag: class="RtAudioDeviceInfo" -->The public device information structure for returning queried values.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>&gt;</code>
<p>
<a href="structRtAudioDeviceInfo-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o0">name</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o1">probed</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o2">outputChannels</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o3">inputChannels</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o4">duplexChannels</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o5">isDefaultOutput</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o6">isDefaultInput</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">std::vector&lt; int &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o7">sampleRates</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="RtAudio_8h.html#a1">RtAudioFormat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioDeviceInfo.html#o8">nativeFormats</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The public device information structure for returning queried values.
<p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="o0"></a><!-- doxytag: member="RtAudioDeviceInfo::name" ref="o0" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">std::string <a class="el" href="structRtAudioDeviceInfo.html#o0">RtAudioDeviceInfo::name</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Character string device identifier. </td>
</tr>
</table>
<a class="anchor" name="o1"></a><!-- doxytag: member="RtAudioDeviceInfo::probed" ref="o1" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">bool <a class="el" href="structRtAudioDeviceInfo.html#o1">RtAudioDeviceInfo::probed</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
true if the device capabilities were successfully probed. </td>
</tr>
</table>
<a class="anchor" name="o2"></a><!-- doxytag: member="RtAudioDeviceInfo::outputChannels" ref="o2" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structRtAudioDeviceInfo.html#o2">RtAudioDeviceInfo::outputChannels</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Maximum output channels supported by device. </td>
</tr>
</table>
<a class="anchor" name="o3"></a><!-- doxytag: member="RtAudioDeviceInfo::inputChannels" ref="o3" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structRtAudioDeviceInfo.html#o3">RtAudioDeviceInfo::inputChannels</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Maximum input channels supported by device. </td>
</tr>
</table>
<a class="anchor" name="o4"></a><!-- doxytag: member="RtAudioDeviceInfo::duplexChannels" ref="o4" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structRtAudioDeviceInfo.html#o4">RtAudioDeviceInfo::duplexChannels</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Maximum simultaneous input/output channels supported by device. </td>
</tr>
</table>
<a class="anchor" name="o5"></a><!-- doxytag: member="RtAudioDeviceInfo::isDefaultOutput" ref="o5" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">bool <a class="el" href="structRtAudioDeviceInfo.html#o5">RtAudioDeviceInfo::isDefaultOutput</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
true if this is the default output device. </td>
</tr>
</table>
<a class="anchor" name="o6"></a><!-- doxytag: member="RtAudioDeviceInfo::isDefaultInput" ref="o6" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">bool <a class="el" href="structRtAudioDeviceInfo.html#o6">RtAudioDeviceInfo::isDefaultInput</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
true if this is the default input device. </td>
</tr>
</table>
<a class="anchor" name="o7"></a><!-- doxytag: member="RtAudioDeviceInfo::sampleRates" ref="o7" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">std::vector&lt;int&gt; <a class="el" href="structRtAudioDeviceInfo.html#o7">RtAudioDeviceInfo::sampleRates</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Supported sample rates (queried from list of standard rates). </td>
</tr>
</table>
<a class="anchor" name="o8"></a><!-- doxytag: member="RtAudioDeviceInfo::nativeFormats" ref="o8" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="RtAudio_8h.html#a1">RtAudioFormat</a> <a class="el" href="structRtAudioDeviceInfo.html#o8">RtAudioDeviceInfo::nativeFormats</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Bit mask of supported data formats. </td>
</tr>
</table>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="RtAudio_8h-source.html">RtAudio.h</a></ul>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2006 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 23
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioStreamParameters-members.html View File

@@ -0,0 +1,23 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Tutorial</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<h1>RtAudioStreamParameters Member List</h1>This is the complete list of members for <a class="el" href="structRtAudioStreamParameters.html">RtAudioStreamParameters</a>, including all inherited members.<p><table>
<tr class="memlist"><td><a class="el" href="structRtAudioStreamParameters.html#o0">deviceId</a></td><td><a class="el" href="structRtAudioStreamParameters.html">RtAudioStreamParameters</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioStreamParameters.html#o2">firstChannel</a></td><td><a class="el" href="structRtAudioStreamParameters.html">RtAudioStreamParameters</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudioStreamParameters.html#o1">nChannels</a></td><td><a class="el" href="structRtAudioStreamParameters.html">RtAudioStreamParameters</a></td><td></td></tr>
</table><HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2006 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 109
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudioStreamParameters.html View File

@@ -0,0 +1,109 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Tutorial</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.4.4 -->
<h1>RtAudioStreamParameters Struct Reference</h1><!-- doxytag: class="RtAudioStreamParameters" -->The structure for specifying input or ouput stream parameters.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>&gt;</code>
<p>
<a href="structRtAudioStreamParameters-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioStreamParameters.html#o0">deviceId</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioStreamParameters.html#o1">nChannels</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudioStreamParameters.html#o2">firstChannel</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The structure for specifying input or ouput stream parameters.
<p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="o0"></a><!-- doxytag: member="RtAudioStreamParameters::deviceId" ref="o0" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structRtAudioStreamParameters.html#o0">RtAudioStreamParameters::deviceId</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Device index (0 to getDeviceCount() - 1). </td>
</tr>
</table>
<a class="anchor" name="o1"></a><!-- doxytag: member="RtAudioStreamParameters::nChannels" ref="o1" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structRtAudioStreamParameters.html#o1">RtAudioStreamParameters::nChannels</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
Number of channels. </td>
</tr>
</table>
<a class="anchor" name="o2"></a><!-- doxytag: member="RtAudioStreamParameters::firstChannel" ref="o2" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structRtAudioStreamParameters.html#o2">RtAudioStreamParameters::firstChannel</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>

<p>
First channel index on device (default = 0). </td>
</tr>
</table>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="RtAudio_8h-source.html">RtAudio.h</a></ul>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2006 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 31
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1DeviceInfo-members.html View File

@@ -0,0 +1,31 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtAudio::DeviceInfo Member List</h1>This is the complete list of members for <a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">duplexChannels</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">inputChannels</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">isDefaultInput</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">isDefaultOutput</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">name</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">nativeFormats</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">outputChannels</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">probed</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">sampleRates</a></td><td><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a></td><td></td></tr>
</table></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 174
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1DeviceInfo.html View File

@@ -0,0 +1,174 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navpath"><a class="el" href="classRtAudio.html">RtAudio</a>::<a class="el" href="structRtAudio_1_1DeviceInfo.html">DeviceInfo</a>
</div>
<div class="contents">
<h1>RtAudio::DeviceInfo Struct Reference</h1><!-- doxytag: class="RtAudio::DeviceInfo" -->
<p>The public device information structure for returning queried values.
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="RtAudio_8h_source.html">RtAudio.h</a>&gt;</code></p>

<p><a href="structRtAudio_1_1DeviceInfo-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">probed</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">name</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">outputChannels</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">inputChannels</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">duplexChannels</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">isDefaultOutput</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">isDefaultInput</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::vector&lt; unsigned int &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">sampleRates</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">nativeFormats</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The public device information structure for returning queried values. </p>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a97573717ccb1e75a834a0a108cd6982d"></a><!-- doxytag: member="RtAudio::DeviceInfo::probed" ref="a97573717ccb1e75a834a0a108cd6982d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="structRtAudio_1_1DeviceInfo.html#a97573717ccb1e75a834a0a108cd6982d">RtAudio::DeviceInfo::probed</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>true if the device capabilities were successfully probed. </p>

</div>
</div>
<a class="anchor" id="a24df596ab8d54f2eb540c7cf16212b3b"></a><!-- doxytag: member="RtAudio::DeviceInfo::name" ref="a24df596ab8d54f2eb540c7cf16212b3b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="structRtAudio_1_1DeviceInfo.html#a24df596ab8d54f2eb540c7cf16212b3b">RtAudio::DeviceInfo::name</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Character string device identifier. </p>

</div>
</div>
<a class="anchor" id="a81aaf488f8158ef55b1bb678f66feb7d"></a><!-- doxytag: member="RtAudio::DeviceInfo::outputChannels" ref="a81aaf488f8158ef55b1bb678f66feb7d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structRtAudio_1_1DeviceInfo.html#a81aaf488f8158ef55b1bb678f66feb7d">RtAudio::DeviceInfo::outputChannels</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Maximum output channels supported by device. </p>

</div>
</div>
<a class="anchor" id="a56247b458a937ae84d98ca9c4b243275"></a><!-- doxytag: member="RtAudio::DeviceInfo::inputChannels" ref="a56247b458a937ae84d98ca9c4b243275" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structRtAudio_1_1DeviceInfo.html#a56247b458a937ae84d98ca9c4b243275">RtAudio::DeviceInfo::inputChannels</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Maximum input channels supported by device. </p>

</div>
</div>
<a class="anchor" id="a3e8ad34c2d14e24293a0beafc26186e7"></a><!-- doxytag: member="RtAudio::DeviceInfo::duplexChannels" ref="a3e8ad34c2d14e24293a0beafc26186e7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structRtAudio_1_1DeviceInfo.html#a3e8ad34c2d14e24293a0beafc26186e7">RtAudio::DeviceInfo::duplexChannels</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Maximum simultaneous input/output channels supported by device. </p>

</div>
</div>
<a class="anchor" id="a5365245e73ffe29a05734de4474acd58"></a><!-- doxytag: member="RtAudio::DeviceInfo::isDefaultOutput" ref="a5365245e73ffe29a05734de4474acd58" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="structRtAudio_1_1DeviceInfo.html#a5365245e73ffe29a05734de4474acd58">RtAudio::DeviceInfo::isDefaultOutput</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>true if this is the default output device. </p>

</div>
</div>
<a class="anchor" id="a7c8aca084bd908799b6be5954b80def2"></a><!-- doxytag: member="RtAudio::DeviceInfo::isDefaultInput" ref="a7c8aca084bd908799b6be5954b80def2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="structRtAudio_1_1DeviceInfo.html#a7c8aca084bd908799b6be5954b80def2">RtAudio::DeviceInfo::isDefaultInput</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>true if this is the default input device. </p>

</div>
</div>
<a class="anchor" id="afa65f5f92f66ce7aacd3ff35e11b230f"></a><!-- doxytag: member="RtAudio::DeviceInfo::sampleRates" ref="afa65f5f92f66ce7aacd3ff35e11b230f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;unsigned int&gt; <a class="el" href="structRtAudio_1_1DeviceInfo.html#afa65f5f92f66ce7aacd3ff35e11b230f">RtAudio::DeviceInfo::sampleRates</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Supported sample rates (queried from list of standard rates). </p>

</div>
</div>
<a class="anchor" id="a23251b549b89b2fe04a57fcd7cb76ea4"></a><!-- doxytag: member="RtAudio::DeviceInfo::nativeFormats" ref="a23251b549b89b2fe04a57fcd7cb76ea4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a> <a class="el" href="structRtAudio_1_1DeviceInfo.html#a23251b549b89b2fe04a57fcd7cb76ea4">RtAudio::DeviceInfo::nativeFormats</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Bit mask of supported data formats. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="RtAudio_8h_source.html">RtAudio.h</a></li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 26
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamOptions-members.html View File

@@ -0,0 +1,26 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtAudio::StreamOptions Member List</h1>This is the complete list of members for <a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">flags</a></td><td><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">numberOfBuffers</a></td><td><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">priority</a></td><td><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">streamName</a></td><td><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a></td><td></td></tr>
</table></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 114
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamOptions.html View File

@@ -0,0 +1,114 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navpath"><a class="el" href="classRtAudio.html">RtAudio</a>::<a class="el" href="structRtAudio_1_1StreamOptions.html">StreamOptions</a>
</div>
<div class="contents">
<h1>RtAudio::StreamOptions Struct Reference</h1><!-- doxytag: class="RtAudio::StreamOptions" -->
<p>The structure for specifying stream options.
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="RtAudio_8h_source.html">RtAudio.h</a>&gt;</code></p>

<p><a href="structRtAudio_1_1StreamOptions-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudioStreamFlags</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">flags</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">numberOfBuffers</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">streamName</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">priority</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The structure for specifying stream options. </p>
<p>The following flags can be OR'ed together to allow a client to make changes to the default stream behavior:</p>
<ul>
<li><em>RTAUDIO_NONINTERLEAVED:</em> Use non-interleaved buffers (default = interleaved).</li>
<li><em>RTAUDIO_MINIMIZE_LATENCY:</em> Attempt to set stream parameters for lowest possible latency.</li>
<li><em>RTAUDIO_HOG_DEVICE:</em> Attempt grab device for exclusive use.</li>
<li><em>RTAUDIO_SCHEDULE_REALTIME:</em> Attempt to select realtime scheduling for callback thread.</li>
<li><em>RTAUDIO_ALSA_USE_DEFAULT:</em> Use the "default" PCM device (ALSA only).</li>
</ul>
<p>By default, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> streams pass and receive audio data from the client in an interleaved format. By passing the RTAUDIO_NONINTERLEAVED flag to the <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream()</a> function, audio data will instead be presented in non-interleaved buffers. In this case, each buffer argument in the RtAudioCallback function will point to a single array of data, with <code>nFrames</code> samples for each channel concatenated back-to-back. For example, the first sample of data for the second channel would be located at index <code>nFrames</code> (assuming the <code>buffer</code> pointer was recast to the correct data type for the stream).</p>
<p>Certain audio APIs offer a number of parameters that influence the I/O latency of a stream. By default, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to set these parameters internally for robust (glitch-free) performance (though some APIs, like Windows Direct Sound, make this difficult). By passing the RTAUDIO_MINIMIZE_LATENCY flag to the <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">openStream()</a> function, internal stream settings will be influenced in an attempt to minimize stream latency, though possibly at the expense of stream performance.</p>
<p>If the RTAUDIO_HOG_DEVICE flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to open the input and/or output stream device(s) for exclusive use. Note that this is not possible with all supported audio APIs.</p>
<p>If the RTAUDIO_SCHEDULE_REALTIME flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to select realtime scheduling (round-robin) for the callback thread. The <code>priority</code> parameter will only be used if the RTAUDIO_SCHEDULE_REALTIME flag is set. It defines the thread's realtime priority.</p>
<p>If the RTAUDIO_ALSA_USE_DEFAULT flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to open the "default" PCM device when using the ALSA API. Note that this will override any specified input or output device id.</p>
<p>The <code>numberOfBuffers</code> parameter can be used to control stream latency in the Windows DirectSound, Linux OSS, and Linux Alsa APIs only. A value of two is usually the smallest allowed. Larger numbers can potentially result in more robust stream performance, though likely at the cost of stream latency. The value set by the user is replaced during execution of the <a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> function by the value actually used by the system.</p>
<p>The <code>streamName</code> parameter can be used to set the client name when using the Jack API. By default, the client name is set to RtApiJack. However, if you wish to create multiple instances of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> with Jack, each instance must have a unique client name. </p>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a0ecc98b031aa3af49d09b781643e298b"></a><!-- doxytag: member="RtAudio::StreamOptions::flags" ref="a0ecc98b031aa3af49d09b781643e298b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudioStreamFlags</a> <a class="el" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">RtAudio::StreamOptions::flags</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT). </p>

</div>
</div>
<a class="anchor" id="a75a14cfab903d0e1c091bc16aec80240"></a><!-- doxytag: member="RtAudio::StreamOptions::numberOfBuffers" ref="a75a14cfab903d0e1c091bc16aec80240" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">RtAudio::StreamOptions::numberOfBuffers</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of stream buffers. </p>

</div>
</div>
<a class="anchor" id="a2a4b0b8d690c624d20f4e8f4be6ca9ba"></a><!-- doxytag: member="RtAudio::StreamOptions::streamName" ref="a2a4b0b8d690c624d20f4e8f4be6ca9ba" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">RtAudio::StreamOptions::streamName</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A stream name (currently used only in Jack). </p>

</div>
</div>
<a class="anchor" id="adfd267059434edb21573c584e6367def"></a><!-- doxytag: member="RtAudio::StreamOptions::priority" ref="adfd267059434edb21573c584e6367def" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">RtAudio::StreamOptions::priority</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="RtAudio_8h_source.html">RtAudio.h</a></li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 25
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamParameters-members.html View File

@@ -0,0 +1,25 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtAudio::StreamParameters Member List</h1>This is the complete list of members for <a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a></td><td><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">firstChannel</a></td><td><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a></td><td><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a></td><td></td></tr>
</table></div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

+ 84
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/structRtAudio_1_1StreamParameters.html View File

@@ -0,0 +1,84 @@
<HTML>
<HEAD>
<TITLE>The RtAudio Home Page</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navpath"><a class="el" href="classRtAudio.html">RtAudio</a>::<a class="el" href="structRtAudio_1_1StreamParameters.html">StreamParameters</a>
</div>
<div class="contents">
<h1>RtAudio::StreamParameters Struct Reference</h1><!-- doxytag: class="RtAudio::StreamParameters" -->
<p>The structure for specifying input or ouput stream parameters.
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="RtAudio_8h_source.html">RtAudio.h</a>&gt;</code></p>

<p><a href="structRtAudio_1_1StreamParameters-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">deviceId</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">nChannels</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">firstChannel</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The structure for specifying input or ouput stream parameters. </p>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ab3c72bcf3ef12149ae9a4fb597cc5489"></a><!-- doxytag: member="RtAudio::StreamParameters::deviceId" ref="ab3c72bcf3ef12149ae9a4fb597cc5489" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structRtAudio_1_1StreamParameters.html#ab3c72bcf3ef12149ae9a4fb597cc5489">RtAudio::StreamParameters::deviceId</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Device index (0 to <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1). </p>

</div>
</div>
<a class="anchor" id="a88a10091b6e284e21235cc6f25332ebd"></a><!-- doxytag: member="RtAudio::StreamParameters::nChannels" ref="a88a10091b6e284e21235cc6f25332ebd" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structRtAudio_1_1StreamParameters.html#a88a10091b6e284e21235cc6f25332ebd">RtAudio::StreamParameters::nChannels</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of channels. </p>

</div>
</div>
<a class="anchor" id="ad4b4503782653ec93c83328c46abe50c"></a><!-- doxytag: member="RtAudio::StreamParameters::firstChannel" ref="ad4b4503782653ec93c83328c46abe50c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structRtAudio_1_1StreamParameters.html#ad4b4503782653ec93c83328c46abe50c">RtAudio::StreamParameters::firstChannel</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>First channel index on device (default = 0). </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="RtAudio_8h_source.html">RtAudio.h</a></li>
</ul>
</div>
<HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
<td>&copy;2001-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
</table>

</BODY>
</HTML>

BIN
source/backend/engine/rtaudio-4.0.11/doc/html/tab_b.gif View File

Before After
Width: 1  |  Height: 1  |  Size: 35B

BIN
source/backend/engine/rtaudio-4.0.11/doc/html/tab_l.gif View File

Before After
Width: 9  |  Height: 300  |  Size: 706B

BIN
source/backend/engine/rtaudio-4.0.11/doc/html/tab_r.gif View File

Before After
Width: 400  |  Height: 300  |  Size: 2.5KB

+ 105
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/tabs.css View File

@@ -0,0 +1,105 @@
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */

DIV.tabs
{
float : left;
width : 100%;
background : url("tab_b.gif") repeat-x bottom;
margin-bottom : 4px;
}

DIV.tabs UL
{
margin : 0px;
padding-left : 10px;
list-style : none;
}

DIV.tabs LI, DIV.tabs FORM
{
display : inline;
margin : 0px;
padding : 0px;
}

DIV.tabs FORM
{
float : right;
}

DIV.tabs A
{
float : left;
background : url("tab_r.gif") no-repeat right top;
border-bottom : 1px solid #84B0C7;
font-size : 80%;
font-weight : bold;
text-decoration : none;
}

DIV.tabs A:hover
{
background-position: 100% -150px;
}

DIV.tabs A:link, DIV.tabs A:visited,
DIV.tabs A:active, DIV.tabs A:hover
{
color: #1A419D;
}

DIV.tabs SPAN
{
float : left;
display : block;
background : url("tab_l.gif") no-repeat left top;
padding : 5px 9px;
white-space : nowrap;
}

DIV.tabs #MSearchBox
{
float : right;
display : inline;
font-size : 1em;
}

DIV.tabs TD
{
font-size : 80%;
font-weight : bold;
text-decoration : none;
}



/* Commented Backslash Hack hides rule from IE5-Mac \*/
DIV.tabs SPAN {float : none;}
/* End IE5-Mac hack */

DIV.tabs A:hover SPAN
{
background-position: 0% -150px;
}

DIV.tabs LI.current A
{
background-position: 100% -150px;
border-width : 0px;
}

DIV.tabs LI.current SPAN
{
background-position: 0% -150px;
padding-bottom : 6px;
}

DIV.navpath
{
background : none;
border : none;
border-bottom : 1px solid #84B0C7;
text-align : center;
margin : 2px;
padding : 2px;
}

+ 88
- 0
source/backend/engine/rtaudio-4.0.11/doc/html/updates.html View File

@@ -0,0 +1,88 @@
<html>
<head>
<title>RtAudio Updates</title>
</head>
<body bgcolor="#FFFFFF">

<center><h1>RtAudio Update Tracker</h1></center>

<h2>Needed Updates & Possible New Features:</h2>

<table border=1 cellpadding=10 cellspacing=0>
<tr bgcolor="#C7CAFF"><td><b>#</b></td><td><b>Description</b></td><td><b>Status</b></td></b></tr>

<tr><td>1</td><td>Check implementation of various stream options (RTAUDIO_HOG_DEVICE, ...) to verify proper implementation.</td><td>UC</td></tr>
<tr><td>2</td><td>Do API-specific implementations of stream time where possible.</td><td>UC</td></tr>
<tr><td>3</td><td>Better support for multichannel (>2) audio devices in Windows DirectSound API.</td><td>UC</td></tr>
<tr><td>4</td><td>Mixer support to set the input volume, output volume, and select the input source (e.g., "Mic" vs "Line In") via following new methods:
<ul>
<li><tt>double getStreamOutputVolume()</tt>: // returns value between 0.0 and 1.0</li>
<li><tt>void setStreamOutputVolume( double volume )</tt>: // volume should be value between 0.0 and 1.0</li>
<li><tt>double getStreamInputVolume()</tt>: // returns value between 0.0 and 1.0</li>
<li><tt>void setStreamInputVolume( double volume )</tt>: // volume should be value between 0.0 and 1.0</li>
<li><tt>void getStreamInputSources( std::vector&lt;std::string&gt;& sources )</tt>: // returns a vector of strings with source names</li>
<li><tt>void setStreamInputSource( unsigned int index )</tt>: // source index is value between 0 and sources.size()-1, as determined from function above</li>
</ul></td><td>UC<a href="#4"><sup>4</sup></a></td></tr>
<tr><td>5</td><td>Robust support for full-duplex with different devices. Provide well-defined behavior if the devices get out of sync, with input taking precedence, so no incoming samples are lost (if possible).</td><td>UC</td></tr>
<tr><td>6</td><td>More sophisticated querying of device capabilities - for example, it'd be nice to figure out that a device supports either 4 channels of 16-bit or 2 channels of 24-bit audio.</td><td>UC</td></tr>
<tr><td>7</td><td>A faster device querying capability in DirectSound API - the current approach can take an extremely long time, especially for devices with many channels (like an RME Fireface 800).</td><td>UC</td></tr>
<tr><td>8</td><td>A way to specify a desired device name, instead of a device index, when opening a stream?</td><td>UC</td></tr>

</table>

<p>
<b>Status Codes:</b>
<p>
<table border=1 cellpadding=10 cellspacing=0>
<tr><td>UC</td><td>Under Consideration</td></tr>
<tr><td>API?</td><td>Approved but need to determine API change</td></tr>
</table>


<h2>Recently Added Features:</h2>

<table border=1 cellpadding=10 cellspacing=0>
<tr bgcolor="#C7CAFF"><td><b>#</b></td><td><b>Description</b></td><td width="20%"><b>Solution</b></td><td><b>Version</b></td></tr>

<tr><td>1</td><td>Stream time support - ability to query the stream and find out the exact time since the stream was started, according to that device's clock. For APIs where this is not supported, this is estimated based on a count of the bytes that have been sent and the known latency.</td><td><a href="#1"><sup>1</sup></a>New <tt>getStreamTime()</tt> function (DM)</td><td>4.0</td></tr>

<tr><td>2</td><td>Ability to determine whether stream is currently running.</td><td>New <tt>bool isStreamRunning()</tt> function (DM)</td><td>4.0</td></tr>

<tr><td>3</td><td>NetBSD support added to Linux OSS API.</td><td>__NetBSD__ must be defined (Emmanuel Dreyfus)</td><td>4.0</td></tr>

<tr><td>4</td><td>Added function to return available compiled APIs</td><td>New <tt>getCompiledApi()</tt> function (GS)</td><td>4.0</td></tr>

<tr><td>5</td><td>Changed <tt>isDefault</tt> member of RtAudioDeviceInfo structure to <tt>isDefaultOutput</tt> and <tt>isDefaultInput</tt> to be able to distinguish between default input and output devices.</td><td>Modified <tt>RtAudioDeviceInfo</tt> structure (GS)</td><td>4.0</td></tr>

<tr><td>6</td><td>Added function to return current API for RtAudio instance</td><td>New <tt>getCurrentApi()</tt> function (GS)</td><td>4.0</td></tr>

<tr><td>7</td><td>Added function to return current stream device(s) index</td><td>New <tt>getStreamDevice()</tt> function (GS)</td><td>4.0</td></tr>

<tr><td>8</td><td>Dummy version that compiles without API compiler flag but does nothing</td><td>New <tt>RtApiDummy</tt> class (GS)</td><td>4.0</td></tr>

<tr><td>9</td><td>Ability to query device latency.</td><td><a href="#2"><sup>2</sup></a>New <tt>getStreamLatency()</tt> function (GS)</td><td>4.0</td></tr>

<tr><td>10</td><td>Choice of opening a device in exclusive or non-exclusive mode. If opening in non-exclusive mode, try to use the device as-is without changing its sample rate, etc - this is good when users want to use two audio devices at once.</td><td><a href="#3"><sup>3</sup></a>New RtAudio::StreamOptions structure and parameters</td><td>4.0</td></tr>

<tr><td>11</td><td>Previous CoreAudio support included only a single stream with multiple channels or multiple one-channel streams.</td><td>Added support for arbitrary stream channel configurations (GS)</td><td>4.0.5</td></tr>

<tr><td>12</td><td>Added function to return actual sample rate used by a stream because sometimes it varies slightly from the specified one.</td><td>New <tt>getStreamSampleRate()</tt> function (Theo Veenker)</td><td>4.0.5</td></tr>

<tr><td>13</td><td>Added way to specify realtime scheduling for unices.</td><td>New StreamOptions flag "RTAUDIO_SCHEDULE_REALTIME" and attribute "priority" to StreamOptions (Theo Veenker)</td><td>4.0.5</td></tr>

</table>

<h2>Details:</h2>

<a name="1"><sup>1</sup></a>Currently implemented by incrementing a counter every time the tickStream() or callback function is called. If the gettimeofday() function is available (right now it is enabled for all Unix-like systems but not Windows), it also records the time of each tickStream() call. Then, when you call getStreamTime(), it adds the elapsed time since the last tickStream also. This makes the playback counter pretty smooth, but accurate. The intent is that now we could implement something more accurate on platforms that support it - but this is a reasonable baseline. One thing to watch out for: asking OSS for the stream time is problematic; on some devices the counter is only 16-bit and wraps around frequently, and on some devices it will sometimes return bogus values.
<P>
<P>
<a name="2"><sup>2</sup></a>This function could not be implemented for all APIs. If the function returns a value of zero, it should be assumed to be invalid.
<P>
<P>
<a name="3"><sup>3</sup></a>This implementation does not attempt to leave a device as-is. However, the flag <tt>RTAUDIO_HOG_DEVICE</tt> is provided to attempt to grab exclusive use of a device.
<P>
<P>
<a name="4"><sup>4</sup></a>I actually coded this up for OS-X Core Audio. However, I found it bloated the code and presented a number of interface problems that did more harm than good. Thus, it is currently not being considered further (GS).
</body>
</html>

BIN
source/backend/engine/rtaudio-4.0.11/doc/images/ccrma.gif View File

Before After
Width: 164  |  Height: 36  |  Size: 3.4KB

BIN
source/backend/engine/rtaudio-4.0.11/doc/images/mcgill.gif View File

Before After
Width: 249  |  Height: 57  |  Size: 4.5KB

+ 145
- 0
source/backend/engine/rtaudio-4.0.11/doc/release.txt View File

@@ -0,0 +1,145 @@
RtAudio - a set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio, and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound and ASIO) operating systems.

By Gary P. Scavone, 2001-2012.

v4.0.11: (14 June 2012)
- fixes for memory leaks in ALSA (thanks to Martin Koegler)
- PulseAudio API support added (thanks to Peter Meerwald and Tristan Matthews)
- bitwise format flag fixes in OS-X (Benjamin Schroeder and Stefan Arisona)
- changes to stopStream / drain flag to avoid hung state in ASIO, DS, OS-X, and Jack APIs (Rasmus Ekman and Carlos Luna)

v4.0.10: (30 August 2011)
- fix for compile bug in Windows DS (counting devices)
- update to configure and library Makefile

v4.0.9: (14 August 2011)
- fix for ASIO problem enumerating devices after opening duplex stream (Oliver Larkin)
- fix for OS-X problems setting sample rate and bits-per-sample
- updates for OS-X "Lion"
- updates for wide character support in Windows DS (UNICODE)
- fix for possible ALSA callback thread hang (thanks to Tristan Matthews)
- fix for DS getDeviceCount bug (vector erase problem)

v4.0.8: (12 April 2011)
- fix for MinGW4 problem enumerating and setting sample rates (iasiothiscallresolver, Dmitry Kostjuchenko)
- fix for OS-X problem handling device names in some languages (CFString conversion, Vincent BĂ©nony)
- small change to OS-X mutex lock location to avoid lockups
- correction to documentation regarding 24-bit data (should be lower 3 bytes, not upper 3 bytes)
- bug fix for error handling of warnings (Antoine Lefebvre)
- added option to use the ALSA "default" device (Tristan Matthews)
- removed use of mutexes in Windows
- fix for ASIO4ALL behavior when stopping/closing streams (Antoine Lefebvre)
- included python binding in "contrib" directory (beta, Antoine Lefebvre)

v4.0.7: (4 February 2010)
- revised Windows DS code and device enumeration to speed up device queries
- OS-X 10.6 updates for deprecated functions
- updates to Jack shutdown code to avoid lockup

v4.0.6: (3 June 2009)
- bug fix in ALSA code to set period size to power of two (thanks to Joakim Karrstrom)
- bug fix in OS-X for OS < 10.5 ... need preprocessor definition around new variable type (thanks to Tristan Matthews)

v4.0.5: (2 February 2009)
- added support in CoreAudio for arbitrary stream channel configurations
- added getStreamSampleRate() function because the actual sample rate can sometimes vary slightly from the specified one (thanks to Theo Veenker)
- added new StreamOptions flag "RTAUDIO_SCHEDULE_REALTIME" and attribute "priority" to StreamOptions (thanks to Theo Veenker)
- replaced usleep(50000) in callbackEvent() by a wait on condition variable which gets signaled in startStream() (thanks to Theo Veenker)
- fix for Jack API when user callback function signals stop or abort calls
- fix to way stream state is changed to avoid infinite loop problem
- fix to int<->float conversion in convertBuffer() (thanks to Theo Veenker)
- bug fix in byteSwapBuffer() (thanks to Stefan Muller Arisona and Theo Veenker)
- fixed a few gcc 4.4 errors in OS-X
- fixed bug in rtaudio-config script
- revised configure script and Makefile structures
- 64-bit fixes in ALSA API (thanks to Stefan Muller Arisona)
- fixed ASIO sample rate selection bug (thanks to Sasha Zheligovsky)

v4.0.4: (24 January 2008)
- added functionality to allow getDeviceInfo() to work in ALSA for an open device (like ASIO)
- fixes in configure script
- fixed clearing of error message stream in error()
- fixed RtAudio::DeviceInfo description in "probing" documentation
- memory leak fixes in ALSA and OSS
- Jack in/out port flag fix
- Windows changes for thread priority and GLOBALFOCUS

v4.0.3: (7 December 2007)
- added support for MinGW compiler to configure script
- a few MinGW-related changes to RtAudio.cpp
- renamed test program probe.cpp to audioprobe.cpp
- moved various header files into single "include" directory and updated VC++ project files

v4.0.2: (21 August 2007)
- fix to RtError::WARNING typo in RtAudio.h (RtApiDummy)
- removed "+1"s in RtApiCore c++ append when getting device name

v4.0.1: (13 August 2007)
- fix to RtError::WARNING typo in RtAudio.cpp

v4.0.0: (7 August 2007)
- new support for non-interleaved user data
- additional input/output parameter specifications, including channel offset
- new support for dynamic connection of devices
- new support for stream time
- revised callback arguments, including separate input and output buffer arguments
- revised C++ exception handling
- revised OSS support for version 4.0
- discontinued support of blocking functionality
- discontinued support of SGI
- Windows DirectSound API bug fix
- NetBSD support (using OSS API) by Emmanuel Dreyfus
- changed default pthread scheduling priority to SCHED_RR when defined in the system
- new getCompiledApi() static function
- new getCurrentApi(), getStreamTime(), getStreamLatency(), and isStreamRunning() functions
- modified RtAudioDeviceInfo structure to distinguish default input and output devices

v3.0.3: (18 November 2005)
- UNICODE fix for Windows DirectSound API
- MinGW compiler fix for ASIO API

v3.0.2: (14 October 2005)
- modification of ALSA read/write order to fix duplex under/overruns
- added synchronization of input/output devices for ALSA duplex operation
- cleaned up and improved error reporting throughout
- bug fix in Windows DirectSound support for 8-bit audio
- bug fix in Windows DirectSound support during device capture query
- added ASIOOutputReady() call near end of callbackEvent to fix some driver behavior
- added #include <stdio.h> to RtAudio.cpp
- fixed bug in RtApiCore for duplex operation with different I/O devices
- improvements to DirectX pointer chasing (by Robin Davies)
- backdoor RtDsStatistics hook provides DirectX performance information (by Robin Davies)
- bug fix for non-power-of-two Asio granularity used by Edirol PCR-A30 (by Robin Davies)
- auto-call CoInitialize for DSOUND and ASIO platforms (by Robin Davies)

v3.0.1: (22 March 2004)
- bug fix in Windows DirectSound support for cards with output only

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
- duplex example change in tutorial

v2.1: (7 October 2002)
- added Mac OS X CoreAudio support
- added Windows ASIO support
- API change to getDeviceInfo(): device argument must be an integer between 1 - getDeviceCount().
- "configure" support added for unix systems
- adopted MIT-like license
- various internal structural changes and bug fixes

v2.01: (27 April 2002)
- Windows destructor bug fix when no devices available
- RtAudioError class renamed to RtError
- Preprocessor definitions changed slightly (i.e. __LINUX_OSS_ to __LINUX_OSS__) to conform with new Synthesis ToolKit distribution

v2.0: (22 January 2002)
- first release of new independent class


+ 257
- 0
source/backend/engine/rtaudio-4.0.11/include/asio.cpp View File

@@ -0,0 +1,257 @@
/*
Steinberg Audio Stream I/O API
(c) 1996, Steinberg Soft- und Hardware GmbH
asio.cpp
asio functions entries which translate the
asio interface to the asiodrvr class methods
*/
#include <string.h>
#include "asiosys.h" // platform definition
#include "asio.h"
#if MAC
#include "asiodrvr.h"
#pragma export on
AsioDriver *theAsioDriver = 0;
extern "C"
{
long main()
{
return 'ASIO';
}
#elif WINDOWS
#include "windows.h"
#include "iasiodrv.h"
#include "asiodrivers.h"
IASIO *theAsioDriver = 0;
extern AsioDrivers *asioDrivers;
#elif SGI || SUN || BEOS || LINUX
#include "asiodrvr.h"
static AsioDriver *theAsioDriver = 0;
#endif
//-----------------------------------------------------------------------------------------------------
ASIOError ASIOInit(ASIODriverInfo *info)
{
#if MAC || SGI || SUN || BEOS || LINUX
if(theAsioDriver)
{
delete theAsioDriver;
theAsioDriver = 0;
}
info->driverVersion = 0;
strcpy(info->name, "No ASIO Driver");
theAsioDriver = getDriver();
if(!theAsioDriver)
{
strcpy(info->errorMessage, "Not enough memory for the ASIO driver!");
return ASE_NotPresent;
}
if(!theAsioDriver->init(info->sysRef))
{
theAsioDriver->getErrorMessage(info->errorMessage);
delete theAsioDriver;
theAsioDriver = 0;
return ASE_NotPresent;
}
strcpy(info->errorMessage, "No ASIO Driver Error");
theAsioDriver->getDriverName(info->name);
info->driverVersion = theAsioDriver->getDriverVersion();
return ASE_OK;
#else
info->driverVersion = 0;
strcpy(info->name, "No ASIO Driver");
if(theAsioDriver) // must be loaded!
{
if(!theAsioDriver->init(info->sysRef))
{
theAsioDriver->getErrorMessage(info->errorMessage);
theAsioDriver = 0;
return ASE_NotPresent;
}
strcpy(info->errorMessage, "No ASIO Driver Error");
theAsioDriver->getDriverName(info->name);
info->driverVersion = theAsioDriver->getDriverVersion();
return ASE_OK;
}
return ASE_NotPresent;
#endif // !MAC
}
ASIOError ASIOExit(void)
{
if(theAsioDriver)
{
#if WINDOWS
asioDrivers->removeCurrentDriver();
#else
delete theAsioDriver;
#endif
}
theAsioDriver = 0;
return ASE_OK;
}
ASIOError ASIOStart(void)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->start();
}
ASIOError ASIOStop(void)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->stop();
}
ASIOError ASIOGetChannels(long *numInputChannels, long *numOutputChannels)
{
if(!theAsioDriver)
{
*numInputChannels = *numOutputChannels = 0;
return ASE_NotPresent;
}
return theAsioDriver->getChannels(numInputChannels, numOutputChannels);
}
ASIOError ASIOGetLatencies(long *inputLatency, long *outputLatency)
{
if(!theAsioDriver)
{
*inputLatency = *outputLatency = 0;
return ASE_NotPresent;
}
return theAsioDriver->getLatencies(inputLatency, outputLatency);
}
ASIOError ASIOGetBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity)
{
if(!theAsioDriver)
{
*minSize = *maxSize = *preferredSize = *granularity = 0;
return ASE_NotPresent;
}
return theAsioDriver->getBufferSize(minSize, maxSize, preferredSize, granularity);
}
ASIOError ASIOCanSampleRate(ASIOSampleRate sampleRate)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->canSampleRate(sampleRate);
}
ASIOError ASIOGetSampleRate(ASIOSampleRate *currentRate)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->getSampleRate(currentRate);
}
ASIOError ASIOSetSampleRate(ASIOSampleRate sampleRate)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->setSampleRate(sampleRate);
}
ASIOError ASIOGetClockSources(ASIOClockSource *clocks, long *numSources)
{
if(!theAsioDriver)
{
*numSources = 0;
return ASE_NotPresent;
}
return theAsioDriver->getClockSources(clocks, numSources);
}
ASIOError ASIOSetClockSource(long reference)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->setClockSource(reference);
}
ASIOError ASIOGetSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->getSamplePosition(sPos, tStamp);
}
ASIOError ASIOGetChannelInfo(ASIOChannelInfo *info)
{
if(!theAsioDriver)
{
info->channelGroup = -1;
info->type = ASIOSTInt16MSB;
strcpy(info->name, "None");
return ASE_NotPresent;
}
return theAsioDriver->getChannelInfo(info);
}
ASIOError ASIOCreateBuffers(ASIOBufferInfo *bufferInfos, long numChannels,
long bufferSize, ASIOCallbacks *callbacks)
{
if(!theAsioDriver)
{
ASIOBufferInfo *info = bufferInfos;
for(long i = 0; i < numChannels; i++, info++)
info->buffers[0] = info->buffers[1] = 0;
return ASE_NotPresent;
}
return theAsioDriver->createBuffers(bufferInfos, numChannels, bufferSize, callbacks);
}
ASIOError ASIODisposeBuffers(void)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->disposeBuffers();
}
ASIOError ASIOControlPanel(void)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->controlPanel();
}
ASIOError ASIOFuture(long selector, void *opt)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->future(selector, opt);
}
ASIOError ASIOOutputReady(void)
{
if(!theAsioDriver)
return ASE_NotPresent;
return theAsioDriver->outputReady();
}
#if MAC
} // extern "C"
#pragma export off
#endif

+ 1054
- 0
source/backend/engine/rtaudio-4.0.11/include/asio.h
File diff suppressed because it is too large
View File


+ 186
- 0
source/backend/engine/rtaudio-4.0.11/include/asiodrivers.cpp View File

@@ -0,0 +1,186 @@
#include <string.h>
#include "asiodrivers.h"
AsioDrivers* asioDrivers = 0;
bool loadAsioDriver(char *name);
bool loadAsioDriver(char *name)
{
if(!asioDrivers)
asioDrivers = new AsioDrivers();
if(asioDrivers)
return asioDrivers->loadDriver(name);
return false;
}
//------------------------------------------------------------------------------------
#if MAC
bool resolveASIO(unsigned long aconnID);
AsioDrivers::AsioDrivers() : CodeFragments("ASIO Drivers", 'AsDr', 'Asio')
{
connID = -1;
curIndex = -1;
}
AsioDrivers::~AsioDrivers()
{
removeCurrentDriver();
}
bool AsioDrivers::getCurrentDriverName(char *name)
{
if(curIndex >= 0)
return getName(curIndex, name);
return false;
}
long AsioDrivers::getDriverNames(char **names, long maxDrivers)
{
for(long i = 0; i < getNumFragments() && i < maxDrivers; i++)
getName(i, names[i]);
return getNumFragments() < maxDrivers ? getNumFragments() : maxDrivers;
}
bool AsioDrivers::loadDriver(char *name)
{
char dname[64];
unsigned long newID;
for(long i = 0; i < getNumFragments(); i++)
{
if(getName(i, dname) && !strcmp(name, dname))
{
if(newInstance(i, &newID))
{
if(resolveASIO(newID))
{
if(connID != -1)
removeInstance(curIndex, connID);
curIndex = i;
connID = newID;
return true;
}
}
break;
}
}
return false;
}
void AsioDrivers::removeCurrentDriver()
{
if(connID != -1)
removeInstance(curIndex, connID);
connID = -1;
curIndex = -1;
}
//------------------------------------------------------------------------------------
#elif WINDOWS
#include "iasiodrv.h"
extern IASIO* theAsioDriver;
AsioDrivers::AsioDrivers() : AsioDriverList()
{
curIndex = -1;
}
AsioDrivers::~AsioDrivers()
{
}
bool AsioDrivers::getCurrentDriverName(char *name)
{
if(curIndex >= 0)
return asioGetDriverName(curIndex, name, 32) == 0 ? true : false;
name[0] = 0;
return false;
}
long AsioDrivers::getDriverNames(char **names, long maxDrivers)
{
for(long i = 0; i < asioGetNumDev() && i < maxDrivers; i++)
asioGetDriverName(i, names[i], 32);
return asioGetNumDev() < maxDrivers ? asioGetNumDev() : maxDrivers;
}
bool AsioDrivers::loadDriver(char *name)
{
char dname[64];
char curName[64];
for(long i = 0; i < asioGetNumDev(); i++)
{
if(!asioGetDriverName(i, dname, 32) && !strcmp(name, dname))
{
curName[0] = 0;
getCurrentDriverName(curName); // in case we fail...
removeCurrentDriver();
if(!asioOpenDriver(i, (void **)&theAsioDriver))
{
curIndex = i;
return true;
}
else
{
theAsioDriver = 0;
if(curName[0] && strcmp(dname, curName))
loadDriver(curName); // try restore
}
break;
}
}
return false;
}
void AsioDrivers::removeCurrentDriver()
{
if(curIndex != -1)
asioCloseDriver(curIndex);
curIndex = -1;
}
#elif SGI || BEOS
#include "asiolist.h"
AsioDrivers::AsioDrivers()
: AsioDriverList()
{
curIndex = -1;
}
AsioDrivers::~AsioDrivers()
{
}
bool AsioDrivers::getCurrentDriverName(char *name)
{
return false;
}
long AsioDrivers::getDriverNames(char **names, long maxDrivers)
{
return 0;
}
bool AsioDrivers::loadDriver(char *name)
{
return false;
}
void AsioDrivers::removeCurrentDriver()
{
}
#else
#error implement me
#endif

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save