]> Repos - portaudio/commitdiff
jack:
authordmitrykos <dmitrykos@0f58301d-fd10-0410-b4af-bbb618454e57>
Thu, 29 Jul 2010 06:29:41 +0000 (06:29 +0000)
committerdmitrykos <dmitrykos@0f58301d-fd10-0410-b4af-bbb618454e57>
Thu, 29 Jul 2010 06:29:41 +0000 (06:29 +0000)
 - fixed assertion in PA processor logics by informing processor that host format is non-interleaved (using paNonInterleaved flag) in PaUtil_InitializeBufferProcessor
 - fixed rare timeout on WaitCondition reported earlier by increasing timeout from 1 second to 10 minutes

src/hostapi/jack/pa_jack.c

index 31357debd4565ac1fc84d897ad4ff98f1f93574a..a73507e4da59df545affbd4750ddb14f9e2e9715 100644 (file)
@@ -1000,7 +1000,7 @@ static PaError WaitCondition( PaJackHostApiRepresentation *hostApi )
     PaTime pt = PaUtil_GetTime();
     struct timespec ts;
 
-    ts.tv_sec = (time_t) floor( pt + 1 );
+    ts.tv_sec = (time_t) floor( pt + 10 * 60 /* 10 minutes */ );
     ts.tv_nsec = (long) ((pt - floor( pt )) * 1000000000);
     /* XXX: Best enclose in loop, in case of spurious wakeups? */
     err = pthread_cond_timedwait( &hostApi->cond, &hostApi->mtx, &ts );
@@ -1177,7 +1177,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
             minimum_buffer_frames = jackHostApi->jack_buffer_size * 3;
 
         /* setup blocking API data structures (FIXME: can fail) */
-       BlockingBegin( stream, minimum_buffer_frames );
+        BlockingBegin( stream, minimum_buffer_frames );
 
         /* install our own callback for the blocking API */
         streamCallback = BlockingCallback;
@@ -1276,10 +1276,10 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
                   &stream->bufferProcessor,
                   inputChannelCount,
                   inputSampleFormat,
-                  paFloat32,            /* hostInputSampleFormat */
+                  paFloat32 | paNonInterleaved, /* hostInputSampleFormat */
                   outputChannelCount,
                   outputSampleFormat,
-                  paFloat32,            /* hostOutputSampleFormat */
+                  paFloat32 | paNonInterleaved, /* hostOutputSampleFormat */
                   jackSr,
                   streamFlags,
                   framesPerBuffer,