aubio


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ext/jackio.c aubio_jack_process



hi.

I was using the aubio jack support functionality from libaubioext, trying to use just the input. I found that it was crashing here in aubio_jack_process because it was trying to write to a non existant channel (as it assumed there that input channels == output channels). I've attached the change I made as a patch.

Thanks for this library.
:)

ciao

bill

--
http://robinson.mine.nu/
--- aubio-0.3.2/ext/jackio.c	2006-10-09 06:01:34.000000000 -0500
+++ aubio-0.3.2-aubio_jack_process_fix/ext/jackio.c	2007-03-20 14:33:34.000000000 -0500
@@ -158,16 +158,18 @@
 
 static int aubio_jack_process(jack_nframes_t nframes, void *arg) {
   aubio_jack_t* dev = (aubio_jack_t *)arg;
   uint_t i;
   for (i=0;i<dev->ichan;i++) { 
     /* get readable input */
     dev->ibufs[i] = 
       (jack_sample_t *) jack_port_get_buffer (dev->iports[i], nframes);
+  }
+  for (i=0;i<dev->ochan;i++) { 
     /* get writable output */
     dev->obufs[i] = 
       (jack_sample_t *) jack_port_get_buffer (dev->oports[i], nframes);
   }
   dev->callback(dev->ibufs,dev->obufs,nframes);
   return 0;
 }