Changeset fe28ff3 for src


Ignore:
Timestamp:
Sep 5, 2007, 9:37:09 PM (17 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:
71d3bf0
Parents:
88199ce
Message:

minor corrections

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/aubio.h

    r88199ce rfe28ff3  
    8080#include "onset.h"
    8181#include "tempo.h"
     82#include "mfcc.h"
    8283
    8384#ifdef __cplusplus
  • src/aubiofilterbank.c

    r88199ce rfe28ff3  
    2525// Initialization
    2626
    27 int aubio_mfcc_init(int N, float nyquist, int style, float freq_min, float freq_max, int freq_bands, float **fft_tables){
     27int aubio_mfcc_init(int N, smpl_t nyquist, int style, smpl_t freq_min, smpl_t freq_max, int freq_bands, smpl_t **fft_tables){
    2828
    2929    int n, i, k, *fft_peak, M, next_peak;
    30     float norm, mel_freq_max, mel_freq_min, norm_fact, height, inc, val,
     30    smpl_t norm, mel_freq_max, mel_freq_min, norm_fact, height, inc, val,
    3131        freq_bw_mel, *mel_peak, *height_norm, *lin_peak;
    3232
     
    3939    freq_bw_mel = (mel_freq_max - mel_freq_min) / freq_bands;
    4040
    41     mel_peak = (float *)malloc((freq_bands + 2) * sizeof(float));
     41    mel_peak = (smpl_t *)malloc((freq_bands + 2) * sizeof(smpl_t));
    4242    /* +2 for zeros at start and end */
    43     lin_peak = (float *)malloc((freq_bands + 2) * sizeof(float));
     43    lin_peak = (smpl_t *)malloc((freq_bands + 2) * sizeof(smpl_t));
    4444    fft_peak = (int *)malloc((freq_bands + 2) * sizeof(int));
    45     height_norm = (float *)malloc(freq_bands * sizeof(float));
     45    height_norm = (smpl_t *)malloc(freq_bands * sizeof(smpl_t));
    4646
    4747    if(mel_peak == NULL || height_norm == NULL ||
  • src/aubiofilterbank.h

    r88199ce rfe28ff3  
    1818   along with this program; if not, write to the Free Software
    1919   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    20 
    2120*/
    2221
    2322#ifndef AUBIOFILTERBANK_H
    24 #include AUBIOFILTERBANK_H
     23#define AUBIOFILTERBANK_H
    2524
    26 #define NYQUIST 22050.f
    2725
    2826// Struct Declaration
     
    3129typedef struct aubio_mel_filter_ {
    3230    int n_filters;
    33     float **filters;
     31    smpl_t **filters;
    3432} aubio_mel_filter;
    3533
     
    4038 * It is up to the caller to pass in a pointer to memory allocated for freq_bands arrays of length N. This function populates these arrays with magnitude coefficients representing the mel filterbank on a linear scale
    4139 */
    42 int aubio_mfcc_init(int N, float nyquist, int style, float freq_min, float freq_max, int freq_bands, float **fft_tables);
     40int aubio_mfcc_init(int N, float nyquist, int style, float freq_min, float freq_max, int freq_bands, smpl_t ** fft_tables);
    4341
    4442#endif
  • src/mfcc.h

    r88199ce rfe28ff3  
    2323#ifndef MFCC_H
    2424#define MFCC_H
     25
     26#include "aubiofilterbank.h"
    2527
    2628#define NYQUIST 22050.f
Note: See TracChangeset for help on using the changeset viewer.