Subject: updated bundled and hacked RtAudio to RtAudio5
---
- src/deps/rtaudio-mod/RtAudio.cpp | 20573 +++++++++++++++++++------------------
- src/deps/rtaudio-mod/RtAudio.h | 116 +-
- 2 files changed, 10396 insertions(+), 10293 deletions(-)
+ src/core/kernelAudio.cpp | 2 +-
+ src/deps/rtaudio-mod/RtAudio.cpp | 20580 +++++++++++++++++++------------------
+ src/deps/rtaudio-mod/RtAudio.h | 113 +-
+ 3 files changed, 10401 insertions(+), 10294 deletions(-)
+diff --git a/src/core/kernelAudio.cpp b/src/core/kernelAudio.cpp
+index d9fe65c..df56c14 100644
+--- a/src/core/kernelAudio.cpp
++++ b/src/core/kernelAudio.cpp
+@@ -59,7 +59,7 @@ JackState jackState;
+
+ jack_client_t *jackGetHandle()
+ {
+- return static_cast<jack_client_t*>(rtSystem->rtapi_->__HACK__getJackClient());
++ return static_cast<jack_client_t*>(rtSystem->GIADA_HACK__getJackClient());
+ }
+
+ #endif
diff --git a/src/deps/rtaudio-mod/RtAudio.cpp b/src/deps/rtaudio-mod/RtAudio.cpp
-index 1586aaa..50c1ea8 100755
+index 1586aaa..62c6858 100755
--- a/src/deps/rtaudio-mod/RtAudio.cpp
+++ b/src/deps/rtaudio-mod/RtAudio.cpp
-@@ -1,10237 +1,10336 @@
+@@ -1,10237 +1,10343 @@
-/************************************************************************/\r
-/*! \class RtAudio\r
- \brief Realtime audio i/o C++ classes.\r
+ return SUCCESS;
+}
+
-+/* --- Monocasual hack ------------------------------------------------------ */
-+void *RtApi :: __HACK__getJackClient() {
-+ JackHandle *handle = (JackHandle *) stream_.apiHandle;
-+ return (void*) handle->client;
-+}
-+
+ //******************** End of __UNIX_JACK__ *********************//
+#endif
+
+ }
+}
+
++void *RtAudio :: GIADA_HACK__getJackClient() { /* Monocasual HACK */
++#if defined(__UNIX_JACK__)
++ RtApiJack*jackapi = dynamic_cast<RtApiJack*>rtapi_;
++ if (jackapi && jackapi->stream_.apiHandle) {
++ JackHandle *handle = (JackHandle *) jackapi->stream_.apiHandle;
++ return (void*) handle->client;
++ }
++#endif
++ return 0;
++}
++
++
++
+ // Indentation settings for Vim and Emacs
+ //
+ // Local Variables:
+ // vim: et sts=2 sw=2
+
diff --git a/src/deps/rtaudio-mod/RtAudio.h b/src/deps/rtaudio-mod/RtAudio.h
-index ddb42cc..a06b945 100755
+index ddb42cc..746bcbc 100755
--- a/src/deps/rtaudio-mod/RtAudio.h
+++ b/src/deps/rtaudio-mod/RtAudio.h
@@ -10,7 +10,7 @@
//! Returns the number of elapsed seconds since the stream was started.
/*!
-@@ -565,14 +567,14 @@ class RtAudio
+@@ -565,14 +567,15 @@ class RtAudio
unsigned int getStreamSampleRate( void );
//! Specify whether warning messages should be printed to stderr.
void openRtApi( RtAudio::Api api );
RtApi *rtapi_;
+
-+ friend class RtApi; /* Monocasual hack */
++ public:
++ void *GIADA_HACK__getJackClient(); /* Monocasual HACK */
};
// Operating system dependent thread functionality.
-@@ -618,7 +620,7 @@ struct CallbackInfo {
+@@ -618,7 +621,7 @@ struct CallbackInfo {
// Default constructor.
CallbackInfo()
};
// **************************************************************** //
-@@ -675,12 +677,6 @@ class RtApi
+@@ -675,12 +678,6 @@ class RtApi
{
public:
RtApi();
virtual ~RtApi();
virtual RtAudio::Api getCurrentApi( void ) = 0;
-@@ -790,7 +786,7 @@ protected:
+@@ -790,7 +787,7 @@ protected:
"warning" message is reported and FAILURE is returned. A
successful probe is indicated by a return value of SUCCESS.
*/
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
-@@ -824,6 +820,12 @@ protected:
+@@ -824,6 +821,8 @@ protected:
//! Protected common method that sets up the parameters for buffer conversion.
void setConvertInfo( StreamMode mode, unsigned int firstChannel );
+
-+#if defined(__UNIX_JACK__)
-+public:
-+ /* --- Monocasual hack ---------------------------------------------------- */
-+ void *__HACK__getJackClient();
-+#endif
++ friend class RtAudio; /* GIADA Hack */
};
// **************************************************************** //
-@@ -832,22 +834,22 @@ protected:
+@@ -832,22 +831,22 @@ protected:
//
// **************************************************************** //
// RtApi Subclass prototypes.
-@@ -882,7 +884,7 @@ public:
+@@ -882,7 +881,7 @@ public:
private:
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
-@@ -916,10 +918,12 @@ public:
+@@ -916,10 +915,12 @@ public:
private:
};
#endif
-@@ -952,7 +956,7 @@ public:
+@@ -952,7 +953,7 @@ public:
std::vector<RtAudio::DeviceInfo> devices_;
void saveDeviceInfo( void );
bool coInitialized_;
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
-@@ -991,7 +995,7 @@ public:
+@@ -991,7 +992,7 @@ public:
bool buffersRolling;
long duplexPrerollBytes;
std::vector<struct DsDevice> dsDevices;
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
-@@ -1062,7 +1066,7 @@ public:
+@@ -1062,7 +1063,7 @@ public:
std::vector<RtAudio::DeviceInfo> devices_;
void saveDeviceInfo( void );
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
-@@ -1126,7 +1130,7 @@ public:
+@@ -1126,7 +1127,7 @@ public:
private:
unsigned int firstChannel, unsigned int sampleRate,
RtAudioFormat format, unsigned int *bufferSize,
RtAudio::StreamOptions *options );
-@@ -1151,7 +1155,7 @@ public:
+@@ -1151,7 +1152,7 @@ public:
private: