From: Torben Hohn Date: Tue, 31 Mar 2009 16:42:10 +0000 (+0200) Subject: only make one buffer fit into the ringbuffer X-Git-Url: https://repo.or.cz/w/libflashsupport-jack.git/commitdiff_plain/cdc8ecf3aa53efbc87d3761e2d17cc4392357087 only make one buffer fit into the ringbuffer --- diff --git a/flashsupport.c b/flashsupport.c index fe0be51..f58c7ee 100644 --- a/flashsupport.c +++ b/flashsupport.c @@ -1083,8 +1083,8 @@ static void *jack_flash_thread( void *arg ) size_t bufsize = 2*flash_frames * sizeof( int16_t ); int16_t *buffer = alloca( bufsize ); - sem_wait( &(p->semaphore) ); - usleep( 50 ); + //sem_wait( &(p->semaphore) ); + //usleep( 50 ); while( !p->quit ) { sem_wait( &(p->semaphore) ); @@ -1222,7 +1222,7 @@ static void *FPX_SoundOutput_Open(void) { // the semaphore represents the number of writeable buffers in // the ringbuffer. we add 1 for the initial sem_wait. - for(i=0; i<( 5 + 1 ); i++ ) + //for(i=0; i<( 5 + 1 ); i++ ) sem_post( &(p->semaphore) ); return p; @@ -1240,6 +1240,7 @@ static int FPX_SoundOutput_Close(void *ptr) { //assert(p); if( p->tid ) { p->quit = 1; + //sem_post( &(p->semaphore) ); pthread_join( p->tid, NULL ); } @@ -1254,7 +1255,8 @@ static int FPX_SoundOutput_Close(void *ptr) { static int FPX_SoundOutput_Latency(void *ptr) { // heh ? jack has no latency :P struct jack_output_data *p = ptr; - return jack_ringbuffer_read_space( p->buffer ) / 4; + //return jack_ringbuffer_read_space( p->buffer ) / 4; + return 0; } #endif