Changeset 39a7b26 for tests


Ignore:
Timestamp:
Nov 26, 2013, 8:09:06 PM (6 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:
88fee8f
Parents:
923a7a8
Message:

src/cvec.h: improve cvec_t api

Location:
tests/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/src/spectral/test-mfcc.c

    r923a7a8 r39a7b26  
    1313  aubio_mfcc_t *o = new_aubio_mfcc (win_s, n_filters, n_coefs, samplerate);
    1414
    15   cvec_set (in, 1.);
     15  cvec_set_all_norm (in, 1.);
    1616  aubio_mfcc_do (o, in, out);
    1717  fvec_print (out);
    1818
    19   cvec_set (in, .5);
     19  cvec_set_all_norm (in, .5);
    2020  aubio_mfcc_do (o, in, out);
    2121  fvec_print (out);
  • tests/src/test-cvec.c

    r923a7a8 r39a7b26  
    2020
    2121  // set all vector elements to `0`
    22   cvec_zeros(complex_vector);
     22  cvec_zeros_norm(complex_vector);
    2323  for ( i = 0; i < complex_vector->length; i++ ) {
    2424    assert( complex_vector->norm[i] == 0. );
     
    2828
    2929  // set all vector elements to `1`
    30   cvec_ones(complex_vector);
     30  cvec_ones_norm(complex_vector);
    3131  for ( i = 0; i < complex_vector->length; i++ ) {
    3232    assert( complex_vector->norm[i] == 1. );
     
    3434  }
    3535  cvec_print(complex_vector);
     36
     37  cvec_zeros(complex_vector);
     38  cvec_zeros_phas(complex_vector);
     39  cvec_zeros_norm(complex_vector);
     40  cvec_ones_norm(complex_vector);
     41  cvec_ones_phas(complex_vector);
     42  cvec_copy(complex_vector, complex_vector);
     43
    3644  // destroy it
    3745  del_cvec(complex_vector);
Note: See TracChangeset for help on using the changeset viewer.