From eca619244a6c045efc7f30473040d4f27aa96a6e Mon Sep 17 00:00:00 2001 From: Monocasual Laboratories Date: Sun, 16 Feb 2020 19:13:40 +0100 Subject: [PATCH] Expose jack_client_t* (HACK) --- RtAudio.cpp | 7 +++++++ RtAudio.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/RtAudio.cpp b/RtAudio.cpp index 02c9f62f..72b310c3 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -2033,6 +2033,13 @@ struct JackHandle { :client(0), drainCounter(0), internalDrain(false) { ports[0] = 0; ports[1] = 0; xrun[0] = false; xrun[1] = false; } }; +#if defined(__UNIX_JACK__) +void* RtAudio :: HACK__getJackClient() +{ + return static_cast(rtapi_->stream_.apiHandle)->client; +} +#endif + #if !defined(__RTAUDIO_DEBUG__) static void jackSilentError( const char * ) {}; #endif diff --git a/RtAudio.h b/RtAudio.h index 834302a7..b03fd709 100644 --- a/RtAudio.h +++ b/RtAudio.h @@ -609,6 +609,10 @@ class RTAUDIO_DLL_PUBLIC RtAudio //! Specify whether warning messages should be printed to stderr. void showWarnings( bool value = true ); +#if defined(__UNIX_JACK__) + void* HACK__getJackClient(); +#endif + protected: void openRtApi( RtAudio::Api api ); @@ -714,6 +718,8 @@ class S24 { class RTAUDIO_DLL_PUBLIC RtApi { +friend RtAudio; // HACK + public: RtApi();