Changeset 41f4c5b


Ignore:
Timestamp:
Oct 8, 2009, 3:08:06 AM (15 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:
66760af
Parents:
05a3479
Message:

src/mathutils.c: indent, add parenthesis and initialise pos in fvec_min_elem needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    r05a3479 r41f4c5b  
    141141fvec_min_elem (fvec_t * s)
    142142{
    143   uint_t i, j = 0, pos = 0.;
     143  uint_t i, j, pos = 0.;
    144144  smpl_t tmp = s->data[0][0];
    145145  for (i = 0; i < s->channels; i++) {
     
    155155fvec_max_elem (fvec_t * s)
    156156{
    157   uint_t i, j, pos;
     157  uint_t i, j, pos = 0;
    158158  smpl_t tmp = 0.0;
    159159  for (i = 0; i < s->channels; i++) {
     
    411411
    412412uint_t
    413 aubio_is_power_of_two(uint_t a) {
    414   if ((a & a-1) == 0) {
     413aubio_is_power_of_two (uint_t a)
     414{
     415  if ((a & (a - 1)) == 0) {
    415416    return 1;
    416417  } else {
    417     return 0; 
     418    return 0;
    418419  }
    419420}
    420421
    421422uint_t
    422 aubio_next_power_of_two(uint_t a) {
     423aubio_next_power_of_two (uint_t a)
     424{
    423425  uint_t i;
    424426  a--;
    425   for (i = 0; i < sizeof(uint_t) * CHAR_BIT; i++ ) {
     427  for (i = 0; i < sizeof (uint_t) * CHAR_BIT; i++) {
    426428    a = a | a >> 1;
    427429  }
    428   return a+1;
     430  return a + 1;
    429431}
    430432
Note: See TracChangeset for help on using the changeset viewer.