source: examples/utils.h @ f5b8800

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since f5b8800 was 9c59a30, checked in by Paul Brossier <piem@piem.org>, 6 years ago

examples/utils.h: process_block returns void

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[96fb8ad]1/*
[466dff3]2  Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
[50bc5f2]3
4  This file is part of aubio.
5
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.
10
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
[96fb8ad]19*/
20
[bd2f2ab]21#include <aubio.h>
[dff2ded]22
[9817026]23#include "config.h"
[bd2f2ab]24
[dff2ded]25#ifdef HAVE_STDIO_H
26#include <stdio.h>              // for fprintf
27#endif
28#ifdef HAVE_STDLIB_H
29#include <stdlib.h>             // for exit
30#endif
31#ifdef HAVE_UNISTD_H
32#include <unistd.h>             // for access
[6144cef]33#elif defined(HAVE_WIN_HACKS)
34#include <io.h>
35#define access _access
36#define F_OK   0
[dff2ded]37#endif
38#ifdef HAVE_MATH_H
39#include <math.h>               // for isfinite
40#endif
41#ifdef HAVE_STRING_H
42#include <string.h>             // for strcmp
43#endif
44
[a3e24ec]45#ifdef HAVE_C99_VARARGS_MACROS
[466dff3]46#ifdef HAVE_DEBUG
47#define debug(...)                fprintf (stderr, __VA_ARGS__)
[a3e24ec]48#else
[466dff3]49#define debug(...)
50#endif
51#define verbmsg(...)              if (verbose) fprintf (stderr, __VA_ARGS__)
52#define errmsg(...)               fprintf (stderr, __VA_ARGS__)
53#define outmsg(...)               fprintf (stdout, __VA_ARGS__)
54#else
55#ifdef HAVE_DEBUG
56#define debug(...)                fprintf (stderr, format , **args)
57#else
[2b43a9e]58#define debug(...)
[466dff3]59#endif
60#define verbmsg(format, args...)  if (verbose) fprintf(stderr, format , ##args)
61#define errmsg(format, args...)   fprintf(stderr, format , ##args)
62#define outmsg(format, args...)   fprintf(stdout, format , ##args)
[a3e24ec]63#endif
64
[50bc5f2]65typedef void (aubio_print_func_t) (void);
[9562f08]66void send_noteon (smpl_t pitch, smpl_t velo);
[bd2f2ab]67
[e9e2a87]68/** common process function */
[9c59a30]69typedef void (*aubio_process_func_t) (fvec_t * input, fvec_t * output);
[d389e23]70
71void process_block (fvec_t *ibuf, fvec_t *obuf);
72void process_print (void);
[340cb93]73
74void print_time (uint_t samples);
Note: See TracBrowser for help on using the repository browser.