Changes in / [0969113:c9e3a4e]


Ignore:
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/aubio_priv.h

    r0969113 rc9e3a4e  
    197197#define DB2LIN(g) (POW(10.0,(g)*0.05f))
    198198#define LIN2DB(v) (20.0*LOG10(v))
    199 #define SQR(_a)   ((_a)*(_a))
    200 
    201 #ifndef MAX
    202 #define MAX(a,b)  (((a)>(b))?(a):(b))
    203 #endif /* MAX */
    204 #ifndef MIN
    205 #define MIN(a,b)  (((a)<(b))?(a):(b))
    206 #endif /* MIN */
     199#define SQR(_a)   (_a*_a)
     200
     201#define MAX(a,b)  ( a > b ? a : b)
     202#define MIN(a,b)  ( a < b ? a : b)
    207203
    208204#define ELEM_SWAP(a,b) { register smpl_t t=(a);(a)=(b);(b)=t; }
  • TabularUnified src/io/audio_unit.c

    r0969113 rc9e3a4e  
    2020
    2121#include "config.h"
    22 #ifdef HAVE_AUDIO_UNIT
     22#ifdef TARGET_OS_IPHONE
    2323#include "aubio_priv.h"
    2424
     
    775775}
    776776
    777 #endif /* HAVE_AUDIO_UNIT */
     777#endif /* TARGET_OS_IPHONE */
  • TabularUnified src/io/sink_sndfile.c

    r0969113 rc9e3a4e  
    3333#define MAX_CHANNELS 6
    3434#define MAX_SIZE 4096
    35 
    36 #if !HAVE_AUBIO_DOUBLE
    37 #define aubio_sf_write_smpl sf_write_float
    38 #else /* HAVE_AUBIO_DOUBLE */
    39 #define aubio_sf_write_smpl sf_write_double
    40 #endif /* HAVE_AUBIO_DOUBLE */
    4135
    4236struct _aubio_sink_sndfile_t {
     
    132126    AUBIO_ERR("sink_sndfile: Failed opening %s. %s\n", s->path, sf_strerror (NULL));
    133127    return AUBIO_FAIL;
    134   }
     128  }     
    135129
    136130  s->scratch_size = s->max_size*s->channels;
     
    141135    return AUBIO_FAIL;
    142136  }
    143   s->scratch_data = AUBIO_ARRAY(smpl_t,s->scratch_size);
     137  s->scratch_data = AUBIO_ARRAY(float,s->scratch_size);
    144138
    145139  return AUBIO_OK;
     
    147141
    148142void aubio_sink_sndfile_do(aubio_sink_sndfile_t *s, fvec_t * write_data, uint_t write){
    149   uint_t i, j, channels = s->channels;
     143  uint_t i, j,  channels = s->channels;
    150144  int nsamples = 0;
    151145  smpl_t *pwrite;
     
    168162  }
    169163
    170   written_frames = aubio_sf_write_smpl (s->handle, s->scratch_data, nsamples);
     164  written_frames = sf_write_float (s->handle, s->scratch_data, nsamples);
    171165  if (written_frames/channels != write) {
    172166    AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written\n",
     
    177171
    178172void aubio_sink_sndfile_do_multi(aubio_sink_sndfile_t *s, fmat_t * write_data, uint_t write){
    179   uint_t i, j, channels = s->channels;
     173  uint_t i, j,  channels = s->channels;
    180174  int nsamples = 0;
    181175  smpl_t *pwrite;
     
    198192  }
    199193
    200   written_frames = aubio_sf_write_smpl (s->handle, s->scratch_data, nsamples);
     194  written_frames = sf_write_float (s->handle, s->scratch_data, nsamples);
    201195  if (written_frames/channels != write) {
    202196    AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written\n",
  • TabularUnified src/io/source_sndfile.c

    r0969113 rc9e3a4e  
    9191    AUBIO_ERR("source_sndfile: Failed opening %s: %s\n", s->path, sf_strerror (NULL));
    9292    goto beach;
    93   }
     93  }     
    9494
    9595  /* get input specs */
  • TabularUnified src/pitch/pitchyinfft.h

    r0969113 rc9e3a4e  
    11/*
    2   Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
  • TabularUnified src/spectral/mfcc.h

    r0969113 rc9e3a4e  
    2222/** \file
    2323
    24   Mel-Frequency Cepstrum Coefficients object
    25 
    26   This object computes MFCC coefficients on an input cvec_t.
    27 
    28   The implementation follows the specifications established by Malcolm Slaney
    29   in its Auditory Toolbox, available online (see file mfcc.m).
    30 
    31   http://engineering.ecn.purdue.edu/~malcolm/interval/1998-010/
     24  Mel-frequency cepstrum coefficients object
    3225
    3326  \example spectral/test-mfcc.c
  • TabularUnified wscript

    r0969113 rc9e3a4e  
    7979            help_str = 'use Accelerate framework (darwin only) (auto)',
    8080            help_disable_str = 'do not use Accelerate framework')
    81     add_option_enable_disable(ctx, 'apple-audio', default = None,
    82             help_str = 'use CoreFoundation (darwin only) (auto)',
    83             help_disable_str = 'do not use CoreFoundation framework')
    8481
    8582    ctx.add_option('--with-target-platform', type='string',
     
    117114
    118115    if target_platform in [ 'darwin', 'ios', 'iosimulator']:
    119         if (ctx.options.enable_apple_audio != False):
    120             ctx.env.FRAMEWORK += ['CoreFoundation', 'AudioToolbox']
    121             ctx.define('HAVE_SOURCE_APPLE_AUDIO', 1)
    122             ctx.define('HAVE_SINK_APPLE_AUDIO', 1)
     116        ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox']
     117        ctx.define('HAVE_SOURCE_APPLE_AUDIO', 1)
     118        ctx.define('HAVE_SINK_APPLE_AUDIO', 1)
    123119        if (ctx.options.enable_accelerate != False):
    124120            ctx.define('HAVE_ACCELERATE', 1)
     
    126122
    127123    if target_platform in [ 'ios', 'iosimulator' ]:
     124        ctx.define('TARGET_OS_IPHONE', 1)
    128125        MINSDKVER="6.1"
    129126        ctx.env.CFLAGS += ['-std=c99']
    130         if (ctx.options.enable_audio_unit != False):
    131             ctx.define('HAVE_AUDIO_UNIT', 1)
    132             #ctx.env.FRAMEWORK += ['CoreFoundation', 'AudioToolbox']
    133127        if target_platform == 'ios':
    134128            DEVROOT = "/Applications/Xcode.app/Contents"
Note: See TracChangeset for help on using the changeset viewer.