From 845f2d40e4b30b735d2364188ae9cef27c7eea33 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 16 Mar 2006 15:47:59 +0000 Subject: [PATCH] add free function add free function --- plugins/puredata/aubiopitch~.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/puredata/aubiopitch~.c b/plugins/puredata/aubiopitch~.c index effd1212..3a088cb0 100644 --- a/plugins/puredata/aubiopitch~.c +++ b/plugins/puredata/aubiopitch~.c @@ -12,7 +12,7 @@ char aubiopitch_version[] = "aubiopitch~ version 0.1"; -aubio_pitchdetection_type type_pitch = aubio_pitch_mcomb; // aubio_pitch_mcomb +aubio_pitchdetection_type type_pitch = aubio_pitch_mcomb; aubio_pitchdetection_mode mode_pitch = aubio_pitchm_freq; static t_class *aubiopitch_tilde_class; @@ -89,11 +89,19 @@ static void *aubiopitch_tilde_new (void) return (void *)x; } +static void *aubiopitch_tilde_del(t_aubiopitch_tilde *x) +{ + del_aubio_pitchdetection(x->o); + del_fvec(x->vec); + return 0; +} + void aubiopitch_tilde_setup (void) { aubiopitch_tilde_class = class_new (gensym ("aubiopitch~"), (t_newmethod)aubiopitch_tilde_new, - 0, sizeof (t_aubiopitch_tilde), + (t_method)aubiopitch_tilde_del, + sizeof (t_aubiopitch_tilde), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addmethod(aubiopitch_tilde_class, (t_method)aubiopitch_tilde_dsp, -- 2.26.2