From ce13dfbf30fd1ab4e7f7eff8886a80f144c75e5d Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Mon, 20 Nov 2017 20:37:49 -0300 Subject: [PATCH] Fix jackXrun handle pointer Thanks github user @bontric, closes #113. --- RtAudio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RtAudio.cpp b/RtAudio.cpp index 1110394..2ac2179 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -2130,7 +2130,7 @@ static void jackShutdown( void *infoPointer ) static int jackXrun( void *infoPointer ) { - JackHandle *handle = (JackHandle *) infoPointer; + JackHandle *handle = *((JackHandle **) infoPointer); if ( handle->ports[0] ) handle->xrun[0] = true; if ( handle->ports[1] ) handle->xrun[1] = true; @@ -2334,7 +2334,7 @@ bool RtApiJack :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigne else { stream_.mode = mode; jack_set_process_callback( handle->client, jackCallbackHandler, (void *) &stream_.callbackInfo ); - jack_set_xrun_callback( handle->client, jackXrun, (void *) &handle ); + jack_set_xrun_callback( handle->client, jackXrun, (void *) &stream_.apiHandle ); jack_on_shutdown( handle->client, jackShutdown, (void *) &stream_.callbackInfo ); }