shithub: aubio

Download patch

ref: b49daf6cd100c92c728b3286d6579e5a479f9945
parent: 33bf50067e4e1e21542db9f0c540087181c738b0
author: Paul Brossier <piem@altern.org>
date: Tue Nov 30 19:18:46 EST 2004

started enabling ladcca support
 ladcca still need works, not sure how to avoid the extern client

--- a/TODO
+++ b/TODO
@@ -1,8 +1,10 @@
 TODO
 
+- test zero crossing in python/aubiocut
+- complete manpages
 - drop the multichannel bits ?
 - drop the midi/jack bits ? 
-- looks like it really needs ring buffers
-- move mathutils and sample to use gsl or some faster library
+- move mathutils and sample to use gsl or some faster library ?
 - code cleanup and optimisation
+- really enable ladcca support
 - mix with libsoundtouch and make a melodyne gui
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -2,8 +2,8 @@
 #SUBDIRS=onsets
 
 # global flags
-AM_CFLAGS = -I../src
-AM_LDFLAGS = -L../src -laubio
+AM_CFLAGS = -I../src @LADCCA_CFLAGS@
+AM_LDFLAGS = -L../src @LADCCA_LIBS@ -laubio
 #AM_SOURCES = utils.c
 
 # add your programs to this list
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -155,8 +155,8 @@
 target_alias = @target_alias@
 
 # global flags
-AM_CFLAGS = -I../src
-AM_LDFLAGS = -L../src -laubio
+AM_CFLAGS = -I../src @LADCCA_CFLAGS@
+AM_LDFLAGS = -L../src @LADCCA_LIBS@ -laubio
 #AM_SOURCES = utils.c
 
 # add your programs to this list
--- a/examples/midialsa.c
+++ b/examples/midialsa.c
@@ -3,6 +3,12 @@
 #include "aubio.h"
 #include <unistd.h>
 
+/* not supported yet */
+#ifdef LADCCA_SUPPORT
+#include <ladcca/ladcca.h>
+cca_client_t * aubio_cca_client;
+#endif /* LADCCA_SUPPORT */
+
 int main(int argc, char **argv) {
 #if ALSA_SUPPORT
   aubio_midi_player_t * mplay = new_aubio_midi_player();
--- a/examples/midiparse.c
+++ b/examples/midiparse.c
@@ -20,6 +20,12 @@
 #include "aubio.h"
 #include <unistd.h>
 
+/* not supported yet */
+#ifdef LADCCA_SUPPORT
+#include <ladcca/ladcca.h>
+cca_client_t * aubio_cca_client;
+#endif /* LADCCA_SUPPORT */
+
 int main(int argc, char ** argv) {
 #if ALSA_SUPPORT
 	aubio_midi_player_t * mplay = new_aubio_midi_player();
--- a/examples/midiplay.c
+++ b/examples/midiplay.c
@@ -25,6 +25,12 @@
 #include "aubio.h"
 #include <unistd.h>
 
+/* not supported yet */
+#ifdef LADCCA_SUPPORT
+#include <ladcca/ladcca.h>
+cca_client_t * aubio_cca_client;
+#endif /* LADCCA_SUPPORT */
+
 int main(int argc, char ** argv) {
 #if ALSA_SUPPORT
   aubio_midi_player_t * mplay = new_aubio_midi_player();
--- a/examples/utils.c
+++ b/examples/utils.c
@@ -12,6 +12,7 @@
 #include <math.h> /* for isfinite */
 #include "utils.h"
 
+/* not supported yet */
 #ifdef LADCCA_SUPPORT
 #include <ladcca/ladcca.h>
 cca_client_t * aubio_cca_client;
--- a/src/aubio_priv.h
+++ b/src/aubio_priv.h
@@ -65,6 +65,13 @@
 #include <string.h>
 #endif
 
+#ifdef ALSA_SUPPORT
+#ifdef LADCCA_SUPPORT
+#include <ladcca/ladcca.h>
+extern cca_client_t * aubio_cca_client;
+#endif /* LADCCA_SUPPORT */
+#endif /* ALSA_SUPPORT */
+
 
 #include "types.h"
 
--- a/src/midi_alsa_raw.c
+++ b/src/midi_alsa_raw.c
@@ -30,7 +30,6 @@
 #include "midi_parser.h"
 #include "midi_driver.h"
 
-
 #if ALSA_SUPPORT
 
 #define ALSA_PCM_NEW_HW_PARAMS_API
@@ -42,12 +41,6 @@
 /* #include <errno.h> //perror is in stdio.h */
 
 #include "config.h"
-
-#ifdef LADCCA_SUPPORT
-#include <ladcca/ladcca.h>
-extern cca_client_t * aubio_cca_client;
-#endif /* LADCCA_SUPPORT */
-
 
 #define AUBIO_ALSA_DEFAULT_MIDI_DEVICE  "default"
 
--- a/src/midi_alsa_seq.c
+++ b/src/midi_alsa_seq.c
@@ -41,12 +41,6 @@
 #include <sys/poll.h>
 /* #include <errno.h> //perror is in stdio.h */
 
-
-#ifdef LADCCA_SUPPORT
-#include <ladcca/ladcca.h>
-extern cca_client_t * aubio_cca_client;
-#endif /* LADCCA_SUPPORT */
-
 #define AUBIO_ALSA_DEFAULT_SEQ_DEVICE   "default"
 
 #define AUBIO_ALSA_BUFFER_LENGTH 512