Changeset 50bc5f2 for examples/utils.h


Ignore:
Timestamp:
Sep 25, 2009, 7:08:59 AM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
04ceeab
Parents:
c3f4173
Message:

examples/utils.{c,h}: update copyright and license, run through indent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.h

    rc3f4173 r50bc5f2  
    11/*
    2          Copyright (C) 2003 Paul Brossier
     2  Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org>
    33
    4          This program is free software; you can redistribute it and/or modify
    5          it under the terms of the GNU General Public License as published by
    6          the Free Software Foundation; either version 2 of the License, or
    7          (at your option) any later version.
     4  This file is part of aubio.
    85
    9          This program is distributed in the hope that it will be useful,
    10          but WITHOUT ANY WARRANTY; without even the implied warranty of
    11          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12          GNU General Public License for more details.
     6  aubio is free software: you can redistribute it and/or modify
     7  it under the terms of the GNU General Public License as published by
     8  the Free Software Foundation, either version 3 of the License, or
     9  (at your option) any later version.
    1310
    14          You should have received a copy of the GNU General Public License
    15          along with this program; if not, write to the Free Software
    16          Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    17          
     11  aubio is distributed in the hope that it will be useful,
     12  but WITHOUT ANY WARRANTY; without even the implied warranty of
     13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14  GNU General Public License for more details.
     15
     16  You should have received a copy of the GNU General Public License
     17  along with aubio.  If not, see <http://www.gnu.org/licenses/>.
     18
    1819*/
    1920
     
    2324#include <getopt.h>
    2425#include <unistd.h>
    25 #include <math.h>
     26#include <math.h>               /* for isfinite */
    2627#include <aubio.h>
    2728#include <aubioext.h>
     
    4445extern int frames_delay;
    4546extern unsigned int median;
    46 extern const char * output_filename;
    47 extern const char * input_filename;
     47extern const char *output_filename;
     48extern const char *input_filename;
    4849/* defined in utils.c */
    4950void usage (FILE * stream, int exit_code);
    5051int parse_args (int argc, char **argv);
    51 void examples_common_init(int argc, char **argv);
    52 void examples_common_del(void);
    53 typedef void (aubio_print_func_t)(void);
     52void examples_common_init (int argc, char **argv);
     53void examples_common_del (void);
     54typedef void (aubio_print_func_t) (void);
    5455#ifndef HAVE_JACK
    5556typedef int (*aubio_process_func_t)
    56         (smpl_t **input, smpl_t **output, int nframes);
     57  (smpl_t ** input, smpl_t ** output, int nframes);
    5758#endif
    58 void examples_common_process(aubio_process_func_t process_func, aubio_print_func_t print);
    59 void flush_process(aubio_process_func_t process_func, aubio_print_func_t print);
     59void examples_common_process (aubio_process_func_t process_func,
     60    aubio_print_func_t print);
     61void flush_process (aubio_process_func_t process_func,
     62    aubio_print_func_t print);
    6063
    6164
    62 void send_noteon(int pitch, int velo);
     65void send_noteon (int pitch, int velo);
    6366/** append new note candidate to the note_buffer and return filtered value. we
    6467 * need to copy the input array as vec_median destroy its input data.*/
    65 void note_append(fvec_t * note_buffer, smpl_t curnote);
    66 uint_t get_note(fvec_t *note_buffer, fvec_t *note_buffer2);
     68void note_append (fvec_t * note_buffer, smpl_t curnote);
     69uint_t get_note (fvec_t * note_buffer, fvec_t * note_buffer2);
    6770
    68 extern const char * output_filename;
    69 extern const char * input_filename;
    70 extern const char * onset_filename;
     71extern const char *output_filename;
     72extern const char *input_filename;
     73extern const char *onset_filename;
    7174extern int verbose;
    7275extern int usejack;
     
    8588
    8689
    87 extern aubio_sndfile_t * file;
    88 extern aubio_sndfile_t * fileout;
     90extern aubio_sndfile_t *file;
     91extern aubio_sndfile_t *fileout;
    8992
    90 extern aubio_pvoc_t * pv;
    91 extern fvec_t * ibuf;
    92 extern fvec_t * obuf;
    93 extern cvec_t * fftgrain;
    94 extern fvec_t * woodblock;
     93extern aubio_pvoc_t *pv;
     94extern fvec_t *ibuf;
     95extern fvec_t *obuf;
     96extern cvec_t *fftgrain;
     97extern fvec_t *woodblock;
    9598extern aubio_onsetdetection_t *o;
    9699extern aubio_onsetdetection_t *o2;
     
    98101extern fvec_t *onset2;
    99102extern int isonset;
    100 extern aubio_pickpeak_t * parms;
     103extern aubio_pickpeak_t *parms;
    101104
    102105
    103106/* pitch objects */
    104107extern smpl_t pitch;
    105 extern aubio_pitchdetection_t * pitchdet;
     108extern aubio_pitchdetection_t *pitchdet;
    106109extern aubio_pitchdetection_type mode;
    107110extern uint_t median;
    108111
    109 extern fvec_t * note_buffer;
    110 extern fvec_t * note_buffer2;
     112extern fvec_t *note_buffer;
     113extern fvec_t *note_buffer2;
    111114extern smpl_t curlevel;
    112115extern smpl_t maxonset;
    113116
    114117/* midi objects */
    115 extern aubio_midi_player_t * mplay;
    116 extern aubio_midi_driver_t * mdriver;
    117 extern aubio_midi_event_t  * event;
     118extern aubio_midi_player_t *mplay;
     119extern aubio_midi_driver_t *mdriver;
     120extern aubio_midi_event_t *event;
    118121
    119122extern smpl_t curnote;
     
    123126/* per example param */
    124127extern uint_t usepitch;
    125 
Note: See TracChangeset for help on using the changeset viewer.