- Timestamp:
- Oct 8, 2009, 3:08:06 AM (15 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
r05a3479 r41f4c5b 141 141 fvec_min_elem (fvec_t * s) 142 142 { 143 uint_t i, j = 0, pos = 0.;143 uint_t i, j, pos = 0.; 144 144 smpl_t tmp = s->data[0][0]; 145 145 for (i = 0; i < s->channels; i++) { … … 155 155 fvec_max_elem (fvec_t * s) 156 156 { 157 uint_t i, j, pos ;157 uint_t i, j, pos = 0; 158 158 smpl_t tmp = 0.0; 159 159 for (i = 0; i < s->channels; i++) { … … 411 411 412 412 uint_t 413 aubio_is_power_of_two(uint_t a) { 414 if ((a & a-1) == 0) { 413 aubio_is_power_of_two (uint_t a) 414 { 415 if ((a & (a - 1)) == 0) { 415 416 return 1; 416 417 } else { 417 return 0; 418 return 0; 418 419 } 419 420 } 420 421 421 422 uint_t 422 aubio_next_power_of_two(uint_t a) { 423 aubio_next_power_of_two (uint_t a) 424 { 423 425 uint_t i; 424 426 a--; 425 for (i = 0; i < sizeof (uint_t) * CHAR_BIT; i++) {427 for (i = 0; i < sizeof (uint_t) * CHAR_BIT; i++) { 426 428 a = a | a >> 1; 427 429 } 428 return a +1;430 return a + 1; 429 431 } 430 432
Note: See TracChangeset
for help on using the changeset viewer.