From 074c197396e1e0cb1375d28a73536bf34a94d417 Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 25 Oct 2017 15:09:10 +0200 Subject: [PATCH] Trying to fix the RtAudio hack Gbp-Dch: ignore --- debian/patches/01-rtaudio5.patch | 80 +++++++++++++++++++------------- debian/patches/series | 2 +- 2 files changed, 50 insertions(+), 32 deletions(-) diff --git a/debian/patches/01-rtaudio5.patch b/debian/patches/01-rtaudio5.patch index 850ca6b..439c1fa 100644 --- a/debian/patches/01-rtaudio5.patch +++ b/debian/patches/01-rtaudio5.patch @@ -3,15 +3,29 @@ Date: Wed, 25 Oct 2017 14:21:33 +0200 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(rtSystem->rtapi_->__HACK__getJackClient()); ++ return static_cast(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 @@ -/************************************************************************/ -/*! \class RtAudio - \brief Realtime audio i/o C++ classes. @@ -12922,12 +12936,6 @@ index 1586aaa..50c1ea8 100755 + return SUCCESS; +} + -+/* --- Monocasual hack ------------------------------------------------------ */ -+void *RtApi :: __HACK__getJackClient() { -+ JackHandle *handle = (JackHandle *) stream_.apiHandle; -+ return (void*) handle->client; -+} -+ + //******************** End of __UNIX_JACK__ *********************// +#endif + @@ -20576,6 +20584,19 @@ index 1586aaa..50c1ea8 100755 + } +} + ++void *RtAudio :: GIADA_HACK__getJackClient() { /* Monocasual HACK */ ++#if defined(__UNIX_JACK__) ++ RtApiJack*jackapi = dynamic_castrtapi_; ++ 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: @@ -20586,7 +20607,7 @@ index 1586aaa..50c1ea8 100755 + // 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 @@ @@ -20787,7 +20808,7 @@ index ddb42cc..a06b945 100755 //! 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. @@ -20802,11 +20823,12 @@ index ddb42cc..a06b945 100755 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() @@ -20815,7 +20837,7 @@ index ddb42cc..a06b945 100755 }; // **************************************************************** // -@@ -675,12 +677,6 @@ class RtApi +@@ -675,12 +678,6 @@ class RtApi { public: @@ -20828,7 +20850,7 @@ index ddb42cc..a06b945 100755 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. */ @@ -20837,20 +20859,16 @@ index ddb42cc..a06b945 100755 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: // // **************************************************************** // @@ -20881,7 +20899,7 @@ index ddb42cc..a06b945 100755 // RtApi Subclass prototypes. -@@ -882,7 +884,7 @@ public: +@@ -882,7 +881,7 @@ public: private: @@ -20890,7 +20908,7 @@ index ddb42cc..a06b945 100755 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: @@ -20904,7 +20922,7 @@ index ddb42cc..a06b945 100755 }; #endif -@@ -952,7 +956,7 @@ public: +@@ -952,7 +953,7 @@ public: std::vector devices_; void saveDeviceInfo( void ); bool coInitialized_; @@ -20913,7 +20931,7 @@ index ddb42cc..a06b945 100755 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 dsDevices; @@ -20922,7 +20940,7 @@ index ddb42cc..a06b945 100755 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 devices_; void saveDeviceInfo( void ); @@ -20931,7 +20949,7 @@ index ddb42cc..a06b945 100755 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: @@ -20940,7 +20958,7 @@ index ddb42cc..a06b945 100755 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: diff --git a/debian/patches/series b/debian/patches/series index a09bfd0..f1d1d9b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,3 @@ -01-rtaudio5.patch 02-rtmidi-pkgconfig.patch 04-catch.patch +01-rtaudio5.patch -- 2.30.2