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 Dec 9, 2020
1 parent 1a8827f commit eca6192
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 @@ -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<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 @@ -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 );
Expand Down Expand Up @@ -714,6 +718,8 @@ class S24 {

class RTAUDIO_DLL_PUBLIC RtApi
{
friend RtAudio; // HACK

public:

RtApi();
Expand Down

0 comments on commit eca6192

Please sign in to comment.