Skip to content

Commit

Permalink
Expose jack_client_t* (HACK)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Feb 1, 2022
1 parent 46b01b5 commit 09c3e7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions RtAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,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<JackHandle*>(rtapi_->stream_.apiHandle)->client;
}
#endif

#if !defined(__RTAUDIO_DEBUG__)
static void jackSilentError( const char * ) {};
#endif
Expand Down
6 changes: 6 additions & 0 deletions RtAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,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 );
Expand Down Expand Up @@ -700,6 +704,8 @@ class S24 {

class RTAUDIO_DLL_PUBLIC RtApi
{
friend RtAudio; // HACK

public:

RtApi();
Expand Down

0 comments on commit 09c3e7b

Please sign in to comment.