Changeset 0969113 for src


Ignore:
Timestamp:
Sep 5, 2015, 11:55:53 AM (9 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:
c59e693
Parents:
c9e3a4e (diff), f8340e1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'develop' into accelerate

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    rc9e3a4e r0969113  
    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 #define MAX(a,b)  ( a > b ? a : b)
    202 #define MIN(a,b)  ( a < b ? a : b)
     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 */
    203207
    204208#define ELEM_SWAP(a,b) { register smpl_t t=(a);(a)=(b);(b)=t; }
  • src/io/audio_unit.c

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

    rc9e3a4e r0969113  
    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 */
    3541
    3642struct _aubio_sink_sndfile_t {
     
    126132    AUBIO_ERR("sink_sndfile: Failed opening %s. %s\n", s->path, sf_strerror (NULL));
    127133    return AUBIO_FAIL;
    128   }     
     134  }
    129135
    130136  s->scratch_size = s->max_size*s->channels;
     
    135141    return AUBIO_FAIL;
    136142  }
    137   s->scratch_data = AUBIO_ARRAY(float,s->scratch_size);
     143  s->scratch_data = AUBIO_ARRAY(smpl_t,s->scratch_size);
    138144
    139145  return AUBIO_OK;
     
    141147
    142148void aubio_sink_sndfile_do(aubio_sink_sndfile_t *s, fvec_t * write_data, uint_t write){
    143   uint_t i, j,  channels = s->channels;
     149  uint_t i, j, channels = s->channels;
    144150  int nsamples = 0;
    145151  smpl_t *pwrite;
     
    162168  }
    163169
    164   written_frames = sf_write_float (s->handle, s->scratch_data, nsamples);
     170  written_frames = aubio_sf_write_smpl (s->handle, s->scratch_data, nsamples);
    165171  if (written_frames/channels != write) {
    166172    AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written\n",
     
    171177
    172178void aubio_sink_sndfile_do_multi(aubio_sink_sndfile_t *s, fmat_t * write_data, uint_t write){
    173   uint_t i, j,  channels = s->channels;
     179  uint_t i, j, channels = s->channels;
    174180  int nsamples = 0;
    175181  smpl_t *pwrite;
     
    192198  }
    193199
    194   written_frames = sf_write_float (s->handle, s->scratch_data, nsamples);
     200  written_frames = aubio_sf_write_smpl (s->handle, s->scratch_data, nsamples);
    195201  if (written_frames/channels != write) {
    196202    AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written\n",
  • src/io/source_sndfile.c

    rc9e3a4e r0969113  
    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 */
  • src/pitch/pitchyinfft.h

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

    rc9e3a4e r0969113  
    2222/** \file
    2323
    24   Mel-frequency cepstrum coefficients object
     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/
    2532
    2633  \example spectral/test-mfcc.c
Note: See TracChangeset for help on using the changeset viewer.