Changeset b511fa9 for examples


Ignore:
Timestamp:
Sep 23, 2009, 7:40:14 PM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
000b090
Parents:
2062e48
Message:

replace FOO_SUPPORT with HAVE_FOO, use float for jack_process function prototype

Location:
examples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    r2062e48 rb511fa9  
    22#include "aubio.h"
    33
    4 #ifndef JACK_SUPPORT
    5 #define JACK_SUPPORT 0
     4#ifndef HAVE_JACK
     5#define HAVE_JACK 0
    66#endif
    77
     
    1313#include "utils.h"
    1414
    15 #ifdef LASH_SUPPORT
     15#ifdef HAVE_LASH
    1616#include <lash/lash.h>
    1717#include <pthread.h>
     
    2323void restore_data(lash_config_t * lash_config);
    2424pthread_t lash_thread;
    25 #endif /* LASH_SUPPORT */
     25#endif /* HAVE_LASH */
    2626
    2727/* settings */
     
    131131                {NULL       , 0, NULL, 0}
    132132        };
    133 #ifdef LASH_SUPPORT
     133#ifdef HAVE_LASH
    134134        lash_args = lash_extract_args(&argc, &argv);
    135 #endif /* LASH_SUPPORT */
     135#endif /* HAVE_LASH */
    136136        prog_name = argv[0];
    137137        if( argc < 1 ) {
     
    238238                debug ("Output file : %s\n", output_filename );
    239239        } else {
    240                 if (JACK_SUPPORT)
     240                if (HAVE_JACK)
    241241                {
    242242                        debug ("Jack input output\n");
     
    288288      fileout = new_aubio_sndfile_wo(file, output_filename);
    289289  }
    290 #ifdef LASH_SUPPORT
     290#ifdef HAVE_LASH
    291291  else {
    292292    aubio_lash_client = lash_init(lash_args, argv[0],
     
    304304    }
    305305  }
    306 #endif /* LASH_SUPPORT */
     306#endif /* HAVE_LASH */
    307307
    308308  ibuf      = new_fvec(overlap_size, channels);
     
    360360void examples_common_process(aubio_process_func_t process_func, aubio_print_func_t print ){
    361361  if(usejack) {
    362 #if JACK_SUPPORT
     362#if HAVE_JACK
    363363    aubio_jack_t * jack_setup;
    364364    debug("Jack init ...\n");
     
    432432    smpl_t mpitch = floor(aubio_freqtomidi(pitch)+.5);
    433433    /* we should check if we use midi here, not jack */
    434 #if ALSA_SUPPORT
     434#if HAVE_ALSA
    435435    if (usejack) {
    436436        if (velo==0) {
     
    474474}
    475475
    476 #if LASH_SUPPORT
     476#if HAVE_LASH
    477477
    478478void * lash_thread_main(void *data __attribute__((unused)))
     
    543543}
    544544
    545 #endif /* LASH_SUPPORT */
    546 
     545#endif /* HAVE_LASH */
     546
  • examples/utils.h

    r2062e48 rb511fa9  
    5252void examples_common_del(void);
    5353typedef void (aubio_print_func_t)(void);
    54 #ifndef JACK_SUPPORT
     54#ifndef HAVE_JACK
    5555typedef int (*aubio_process_func_t)
    56         (smpl_t **input, smpl_t **output, int nframes);
     56        (float **input, float **output, int nframes);
    5757#endif
    5858void examples_common_process(aubio_process_func_t process_func, aubio_print_func_t print);
Note: See TracChangeset for help on using the changeset viewer.