Changeset b511fa9


Ignore:
Timestamp:
Sep 23, 2009, 7:40:14 PM (10 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:
000b090
Parents:
2062e48
Message:

replace FOO_SUPPORT with HAVE_FOO, use float for jack_process function prototype

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r2062e48 rb511fa9  
    143143AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
    144144
    145 PKG_CHECK_MODULES(SNDLIB,     sndfile >= 1.0.4,       SNDLIB_SUPPORT=1)
    146 PKG_CHECK_MODULES(SAMPLERATE, samplerate  >= 0.0.15,  SAMPLERATE_SUPPORT=1)
    147 
    148 if test "${SNDLIB_SUPPORT}" = "1"; then
    149   AC_DEFINE(SNDLIB_SUPPORT,1,[Define to enable libsndfile support])
     145PKG_CHECK_MODULES(SNDLIB,     sndfile >= 1.0.4,       HAVE_SNDLIB=1)
     146PKG_CHECK_MODULES(SAMPLERATE, samplerate  >= 0.0.15,  HAVE_SAMPLERATE=1)
     147
     148if test "${HAVE_SNDLIB}" = "1"; then
     149  AC_DEFINE(HAVE_SNDLIB,1,[Define to enable libsndfile support])
    150150fi
    151151
     
    156156  with_fftw3f="yes")
    157157if test "$with_fftw3f" = "yes"; then
    158   PKG_CHECK_MODULES(FFTWLIB,    fftw3f >= 3.0.0,     FFTW3F_SUPPORT=1, FFTW3F_SUPPORT=0)
    159 else
    160   PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,     FFTW3_SUPPORT=1)
    161 fi
    162 if test "${FFTW3F_SUPPORT}" = "0"; then
    163   PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,     FFTW3_SUPPORT=1)
    164 fi
    165 if test "${FFTW3_SUPPORT}" = "1"; then
    166   AC_DEFINE(FFTW3_SUPPORT,1,[Define to enable fftw3 support])
    167 fi
    168 if test "${FFTW3F_SUPPORT}" = "1"; then
    169   AC_DEFINE(FFTW3F_SUPPORT,1,[Define to enable fftw3f support])
     158  PKG_CHECK_MODULES(FFTWLIB,    fftw3f >= 3.0.0,     HAVE_FFTW3F=1, HAVE_FFTW3F=0)
     159else
     160  PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,     HAVE_FFTW3=1)
     161fi
     162if test "${HAVE_FFTW3F}" = "0"; then
     163  PKG_CHECK_MODULES(FFTWLIB,    fftw3  >= 3.0.0,     HAVE_FFTW3=1)
     164fi
     165if test "${HAVE_FFTW3}" = "1"; then
     166  AC_DEFINE(HAVE_FFTW3,1,[Define to enable fftw3 support])
     167fi
     168if test "${HAVE_FFTW3F}" = "1"; then
     169  AC_DEFINE(HAVE_FFTW3F,1,[Define to enable fftw3f support])
    170170fi
    171171
     
    177177if test "$with_jack" = "yes"
    178178then
    179   PKG_CHECK_MODULES(JACK,       jack  >= 0.15.0,     JACK_SUPPORT=1, JACK_SUPPORT=0)
    180   if test "${JACK_SUPPORT}" = "1"; then
    181     AC_DEFINE(JACK_SUPPORT,1,[Define to enable jack support])
     179  PKG_CHECK_MODULES(JACK,       jack  >= 0.15.0,     HAVE_JACK=1, HAVE_JACK=0)
     180  if test "${HAVE_JACK}" = "1"; then
     181    AC_DEFINE(HAVE_JACK,1,[Define to enable jack support])
    182182  fi
    183183fi
     
    192192  if test "$with_jack" = "yes"
    193193  then
    194     PKG_CHECK_MODULES(ALSA,      alsa >= 0.0.9,      ALSA_SUPPORT=1, ALSA_SUPPORT=0)
    195     if test "${ALSA_SUPPORT}" = "1"; then
    196       AC_DEFINE(ALSA_SUPPORT,1,[Define to enable alsa support])
     194    PKG_CHECK_MODULES(ALSA,      alsa >= 0.0.9,      HAVE_ALSA=1, HAVE_ALSA=0)
     195    if test "${HAVE_ALSA}" = "1"; then
     196      AC_DEFINE(HAVE_ALSA,1,[Define to enable alsa support])
    197197    fi
    198198  else
     
    208208if test "$with_lash" = "yes"
    209209then
    210   PKG_CHECK_MODULES(LASH,   lash-1.0 >= 0.5.0,   LASH_SUPPORT=1, LASH_SUPPORT=0)
    211   if test "${LASH_SUPPORT}" = "1"; then
    212     LASH_CFLAGS+="-DLASH_SUPPORT"
     210  PKG_CHECK_MODULES(LASH,   lash-1.0 >= 0.5.0,   HAVE_LASH=1, HAVE_LASH=0)
     211  if test "${HAVE_LASH}" = "1"; then
     212    LASH_CFLAGS+="-DHAVE_LASH"
    213213  fi
    214214fi
     
    270270echo "**************************************************************"
    271271echo "Summary:"
    272 if test "${FFTW3F_SUPPORT}" = "1"; then
     272if test "${HAVE_FFTW3F}" = "1"; then
    273273  echo "Fftw3:                   yes (using fftw3f)"
    274274else
    275 if test "${FFTW3_SUPPORT}" = "1"; then
     275if test "${HAVE_FFTW3}" = "1"; then
    276276  echo "Fftw3:                   yes (not using fftw3f)"
    277277else
     
    279279fi
    280280fi
    281 if test "${SNDLIB_SUPPORT}" = "1"; then
     281if test "${HAVE_SNDLIB}" = "1"; then
    282282  echo "Libsndfile:              yes"
    283283else
    284284  echo "Libsndfile:              no"
    285285fi
    286 if test "${SAMPLERATE_SUPPORT}" = "1"; then
     286if test "${HAVE_SAMPLERATE}" = "1"; then
    287287  echo "Libsamplerate:           yes"
    288288else
    289289  echo "Libsamplerate:           no"
    290290fi
    291 if test "${JACK_SUPPORT}" = "1"; then
     291if test "${HAVE_JACK}" = "1"; then
    292292  echo "JACK:                    yes"
    293293else
    294294  echo "JACK:                    no"
    295295fi
    296 if test "${ALSA_SUPPORT}" = "1"; then
     296if test "${HAVE_ALSA}" = "1"; then
    297297  echo "ALSA midi:               yes"
    298298else
    299299  echo "ALSA midi:               no"
    300300fi
    301 if test "${LASH_SUPPORT}" = "1"; then
     301if test "${HAVE_LASH}" = "1"; then
    302302  echo "Lash:                    yes"
    303303else
  • 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);
  • ext/aubioext.h

    r2062e48 rb511fa9  
    2828#include <aubio.h>
    2929 
    30 #ifdef JACK_SUPPORT
     30#ifdef HAVE_JACK
    3131#include "jackio.h"
    3232#endif
     33
     34#if HAVE_ALSA
     35#define ALSA_SUPPORT 1
     36#endif
    3337
    3438#include "sndfileio.h"
  • ext/jackio.c

    r2062e48 rb511fa9  
    1919
    2020#include "config.h"
    21 #ifdef JACK_SUPPORT
     21#ifdef HAVE_JACK
    2222#include <jack/jack.h>
    2323#include "aubio_priv.h"
     
    173173
    174174
    175 #endif /* JACK_SUPPORT */
     175#endif /* HAVE_JACK */
  • ext/jackio.h

    r2062e48 rb511fa9  
    3535typedef struct _aubio_jack_t aubio_jack_t;
    3636/** jack process function */
    37 typedef int (*aubio_process_func_t)(smpl_t **input, smpl_t **output, int
     37typedef int (*aubio_process_func_t)(float **input, float **output, int
    3838    nframes);
    3939
  • ext/midi/midi_driver.h

    r2062e48 rb511fa9  
    5050void aubio_midi_driver_settings(aubio_settings_t* settings);
    5151
    52 #include "config.h"
    53 #if JACK_SUPPORT
     52#include "aubioext.h"
     53#if HAVE_JACK
    5454void aubio_midi_direct_output(aubio_midi_driver_t * dev, aubio_midi_event_t * event);
    55 #endif
     55#endif /* HAVE_JACK */
    5656
    5757#endif  /* _AUBIO_AUDRIVER_H */
  • src/aubio_priv.h

    r2062e48 rb511fa9  
    3333 */
    3434
    35 #if HAVE_CONFIG_H
     35#if 1 //HAVE_CONFIG_H
    3636#include "config.h"
    3737#endif
     
    5858#endif
    5959
    60 #if HAVE_STRINGS_H
     60#if HAVE_STRING_H
    6161#include <string.h>
    6262#endif
  • src/mathutils.c

    r2062e48 rb511fa9  
    419419
    420420void aubio_cleanup(void) {
    421 #if FFTW3_SUPPORT
     421#if HAVE_FFTW3
    422422  fftw_cleanup();
    423423#else
    424 #if FFTW3F_SUPPORT
     424#if HAVE_FFTW3F
    425425  fftwf_cleanup();
    426426#endif
  • src/spectral/fft.c

    r2062e48 rb511fa9  
    2424#include "spectral/fft.h"
    2525
    26 #if FFTW3F_SUPPORT
     26#if HAVE_FFTW3F
    2727#define fftw_malloc            fftwf_malloc
    2828#define fftw_free              fftwf_free
     
    3535#endif
    3636
    37 #if FFTW3F_SUPPORT
     37#if HAVE_FFTW3F
    3838#if !AUBIO_SINGLE_PRECISION
    3939#warning "Using aubio in double precision with fftw3 in single precision"
  • src/spectral/fft.h

    r2062e48 rb511fa9  
    3232
    3333#ifdef HAVE_COMPLEX_H
    34 #if FFTW3F_SUPPORT
     34#if HAVE_FFTW3F
    3535#define FFTW_TYPE fftwf_complex
    3636#else
     
    3838#endif
    3939#else
    40 #if FFTW3F_SUPPORT
     40#if HAVE_FFTW3F
    4141/** fft data type */
    4242#define FFTW_TYPE float
  • tests/src/test-phasevoc-jack.c

    r2062e48 rb511fa9  
    2121aubio_pvoc_t * pv;
    2222
    23 #ifdef JACK_SUPPORT
     23#ifdef HAVE_JACK
    2424aubio_jack_t * jack_setup;
    2525#endif
     
    4343        printf("computed backard\n");
    4444
    45 #ifdef JACK_SUPPORT
     45#ifdef HAVE_JACK
    4646        jack_setup  = new_aubio_jack(channels, channels,
    4747                        (aubio_process_func_t)aubio_process);
Note: See TracChangeset for help on using the changeset viewer.