From 4356f9958d4478704f7fcb4e854c45810302e0af Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 29 Jan 2020 11:11:17 +0100 Subject: [PATCH] Refresh RtAudio patch --- debian/patches/01-rtaudio5.patch | 78 +++++++++++++++----------------- 1 file changed, 36 insertions(+), 42 deletions(-) diff --git a/debian/patches/01-rtaudio5.patch b/debian/patches/01-rtaudio5.patch index 6215633..9d62d74 100644 --- a/debian/patches/01-rtaudio5.patch +++ b/debian/patches/01-rtaudio5.patch @@ -8,11 +8,9 @@ Subject: updated bundled and hacked RtAudio to RtAudio5 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 4d42806..3e7daf7 100644 ---- a/src/core/kernelAudio.cpp -+++ b/src/core/kernelAudio.cpp -@@ -59,7 +59,7 @@ JackState jackState; +--- giada.orig/src/core/kernelAudio.cpp ++++ giada/src/core/kernelAudio.cpp +@@ -55,7 +55,7 @@ jack_client_t* jackGetHandle() { @@ -21,10 +19,8 @@ index 4d42806..3e7daf7 100644 } #endif -diff --git a/src/deps/rtaudio-mod/RtAudio.cpp b/src/deps/rtaudio-mod/RtAudio.cpp -index 1586aaa..ad8bdaa 100755 ---- a/src/deps/rtaudio-mod/RtAudio.cpp -+++ b/src/deps/rtaudio-mod/RtAudio.cpp +--- giada.orig/src/deps/rtaudio-mod/RtAudio.cpp ++++ giada/src/deps/rtaudio-mod/RtAudio.cpp @@ -1,10237 +1,10343 @@ -/************************************************************************/ -/*! \class RtAudio @@ -1969,7 +1965,7 @@ index 1586aaa..ad8bdaa 100755 -}; - -/* --- Monocasual hack ------------------------------------------------------ */ --#ifdef __linux__ +-#if defined(__linux__) || defined(__FreeBSD__) -void *RtApi :: __HACK__getJackClient() { - JackHandle *handle = (JackHandle *) stream_.apiHandle; - return (void*) handle->client; @@ -20606,10 +20602,8 @@ index 1586aaa..ad8bdaa 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..746bcbc 100755 ---- a/src/deps/rtaudio-mod/RtAudio.h -+++ b/src/deps/rtaudio-mod/RtAudio.h +--- giada.orig/src/deps/rtaudio-mod/RtAudio.h ++++ giada/src/deps/rtaudio-mod/RtAudio.h @@ -10,7 +10,7 @@ RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/ @@ -20633,7 +20627,7 @@ index ddb42cc..746bcbc 100755 #include /*! \typedef typedef unsigned long RtAudioFormat; -@@ -86,6 +86,7 @@ static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/mi +@@ -86,6 +86,7 @@ - \e RTAUDIO_MINIMIZE_LATENCY: Attempt to set stream parameters for lowest possible latency. - \e RTAUDIO_HOG_DEVICE: Attempt grab device for exclusive use. - \e RTAUDIO_ALSA_USE_DEFAULT: Use the "default" PCM device (ALSA only). @@ -20641,7 +20635,7 @@ index ddb42cc..746bcbc 100755 By default, RtAudio streams pass and receive audio data from the client in an interleaved format. By passing the -@@ -111,12 +112,15 @@ static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/mi +@@ -111,12 +112,15 @@ open the input and/or output stream device(s) for exclusive use. Note that this is not possible with all supported audio APIs. @@ -20658,7 +20652,7 @@ index ddb42cc..746bcbc 100755 */ typedef unsigned int RtAudioStreamFlags; static const RtAudioStreamFlags RTAUDIO_NONINTERLEAVED = 0x1; // Use non-interleaved buffers (default = interleaved). -@@ -124,6 +128,7 @@ static const RtAudioStreamFlags RTAUDIO_MINIMIZE_LATENCY = 0x2; // Attempt to s +@@ -124,6 +128,7 @@ static const RtAudioStreamFlags RTAUDIO_HOG_DEVICE = 0x4; // Attempt grab device and prevent use by others. static const RtAudioStreamFlags RTAUDIO_SCHEDULE_REALTIME = 0x8; // Try to select realtime scheduling for callback thread. static const RtAudioStreamFlags RTAUDIO_ALSA_USE_DEFAULT = 0x10; // Use the "default" PCM device (ALSA only). @@ -20666,7 +20660,7 @@ index ddb42cc..746bcbc 100755 /*! \typedef typedef unsigned long RtAudioStreamStatus; \brief RtAudio stream status (over- or underflow) flags. -@@ -195,7 +200,7 @@ typedef int (*RtAudioCallback)( void *outputBuffer, void *inputBuffer, +@@ -195,7 +200,7 @@ */ /************************************************************************/ @@ -20675,7 +20669,7 @@ index ddb42cc..746bcbc 100755 { public: //! Defined RtAudioError types. -@@ -214,25 +219,22 @@ class RtAudioError : public std::exception +@@ -214,25 +219,22 @@ }; //! The constructor. @@ -20709,7 +20703,7 @@ index ddb42cc..746bcbc 100755 Type type_; }; -@@ -341,7 +343,7 @@ class RtAudio +@@ -341,7 +343,7 @@ open the input and/or output stream device(s) for exclusive use. Note that this is not possible with all supported audio APIs. @@ -20718,7 +20712,7 @@ index ddb42cc..746bcbc 100755 to select realtime scheduling (round-robin) for the callback thread. The \c priority parameter will only be used if the RTAUDIO_SCHEDULE_REALTIME flag is set. It defines the thread's realtime priority. -@@ -375,7 +377,7 @@ class RtAudio +@@ -375,7 +377,7 @@ }; //! A static function to determine the current RtAudio version. @@ -20727,7 +20721,7 @@ index ddb42cc..746bcbc 100755 //! A static function to determine the available compiled audio APIs. /*! -@@ -383,7 +385,7 @@ class RtAudio +@@ -383,7 +385,7 @@ the enumerated list values. Note that there can be more than one API compiled for certain operating systems. */ @@ -20736,7 +20730,7 @@ index ddb42cc..746bcbc 100755 //! The class constructor. /*! -@@ -401,18 +403,18 @@ class RtAudio +@@ -401,18 +403,18 @@ If a stream is running or open, it will be stopped and closed automatically. */ @@ -20759,7 +20753,7 @@ index ddb42cc..746bcbc 100755 //! Return an RtAudio::DeviceInfo structure for a specified device number. /*! -@@ -435,7 +437,7 @@ class RtAudio +@@ -435,7 +437,7 @@ client's responsibility to verify that a device is available before attempting to open a stream. */ @@ -20768,7 +20762,7 @@ index ddb42cc..746bcbc 100755 //! A function that returns the index of the default input device. /*! -@@ -445,7 +447,7 @@ class RtAudio +@@ -445,7 +447,7 @@ client's responsibility to verify that a device is available before attempting to open a stream. */ @@ -20777,7 +20771,7 @@ index ddb42cc..746bcbc 100755 //! A public function for opening a stream with the specified parameters. /*! -@@ -477,7 +479,7 @@ class RtAudio +@@ -477,7 +479,7 @@ from within the callback function. \param options An optional pointer to a structure containing various global stream options, including a list of OR'ed RtAudioStreamFlags @@ -20786,7 +20780,7 @@ index ddb42cc..746bcbc 100755 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 -@@ -498,7 +500,7 @@ class RtAudio +@@ -498,7 +500,7 @@ If a stream is not open, this function issues a warning and returns (no exception is thrown). */ @@ -20795,7 +20789,7 @@ index ddb42cc..746bcbc 100755 //! A function that starts a stream. /*! -@@ -528,10 +530,10 @@ class RtAudio +@@ -528,10 +530,10 @@ void abortStream( void ); //! Returns true if a stream is open and false if not. @@ -20808,7 +20802,7 @@ index ddb42cc..746bcbc 100755 //! Returns the number of elapsed seconds since the stream was started. /*! -@@ -565,14 +567,15 @@ class RtAudio +@@ -565,14 +567,15 @@ unsigned int getStreamSampleRate( void ); //! Specify whether warning messages should be printed to stderr. @@ -20828,7 +20822,7 @@ index ddb42cc..746bcbc 100755 }; // Operating system dependent thread functionality. -@@ -618,7 +621,7 @@ struct CallbackInfo { +@@ -618,7 +621,7 @@ // Default constructor. CallbackInfo() @@ -20837,12 +20831,12 @@ index ddb42cc..746bcbc 100755 }; // **************************************************************** // -@@ -675,12 +678,6 @@ class RtApi +@@ -675,12 +678,6 @@ { public: - /* --- Monocasual hack ---------------------------------------------------- */ -- #ifdef __linux__ +- #if defined(__linux__) || defined(__FreeBSD__) - void *__HACK__getJackClient(); - #endif - /* ------------------------------------------------------------------------ */ @@ -20850,7 +20844,7 @@ index ddb42cc..746bcbc 100755 RtApi(); virtual ~RtApi(); virtual RtAudio::Api getCurrentApi( void ) = 0; -@@ -790,7 +787,7 @@ protected: +@@ -790,7 +787,7 @@ "warning" message is reported and FAILURE is returned. A successful probe is indicated by a return value of SUCCESS. */ @@ -20859,7 +20853,7 @@ index ddb42cc..746bcbc 100755 unsigned int firstChannel, unsigned int sampleRate, RtAudioFormat format, unsigned int *bufferSize, RtAudio::StreamOptions *options ); -@@ -824,6 +821,8 @@ protected: +@@ -824,6 +821,8 @@ //! Protected common method that sets up the parameters for buffer conversion. void setConvertInfo( StreamMode mode, unsigned int firstChannel ); @@ -20868,7 +20862,7 @@ index ddb42cc..746bcbc 100755 }; // **************************************************************** // -@@ -832,22 +831,22 @@ protected: +@@ -832,22 +831,22 @@ // // **************************************************************** // @@ -20899,7 +20893,7 @@ index ddb42cc..746bcbc 100755 // RtApi Subclass prototypes. -@@ -882,7 +881,7 @@ public: +@@ -882,7 +881,7 @@ private: @@ -20908,7 +20902,7 @@ index ddb42cc..746bcbc 100755 unsigned int firstChannel, unsigned int sampleRate, RtAudioFormat format, unsigned int *bufferSize, RtAudio::StreamOptions *options ); -@@ -916,10 +915,12 @@ public: +@@ -916,10 +915,12 @@ private: @@ -20922,7 +20916,7 @@ index ddb42cc..746bcbc 100755 }; #endif -@@ -952,7 +953,7 @@ public: +@@ -952,7 +953,7 @@ std::vector devices_; void saveDeviceInfo( void ); bool coInitialized_; @@ -20931,7 +20925,7 @@ index ddb42cc..746bcbc 100755 unsigned int firstChannel, unsigned int sampleRate, RtAudioFormat format, unsigned int *bufferSize, RtAudio::StreamOptions *options ); -@@ -991,7 +992,7 @@ public: +@@ -991,7 +992,7 @@ bool buffersRolling; long duplexPrerollBytes; std::vector dsDevices; @@ -20940,7 +20934,7 @@ index ddb42cc..746bcbc 100755 unsigned int firstChannel, unsigned int sampleRate, RtAudioFormat format, unsigned int *bufferSize, RtAudio::StreamOptions *options ); -@@ -1062,7 +1063,7 @@ public: +@@ -1062,7 +1063,7 @@ std::vector devices_; void saveDeviceInfo( void ); @@ -20949,7 +20943,7 @@ index ddb42cc..746bcbc 100755 unsigned int firstChannel, unsigned int sampleRate, RtAudioFormat format, unsigned int *bufferSize, RtAudio::StreamOptions *options ); -@@ -1126,7 +1127,7 @@ public: +@@ -1126,7 +1127,7 @@ private: @@ -20958,7 +20952,7 @@ index ddb42cc..746bcbc 100755 unsigned int firstChannel, unsigned int sampleRate, RtAudioFormat format, unsigned int *bufferSize, RtAudio::StreamOptions *options ); -@@ -1151,7 +1152,7 @@ public: +@@ -1151,7 +1152,7 @@ private: -- 2.30.2