Changeset 10a5413 for src/mathutils.c
- Timestamp:
- Oct 7, 2009, 6:26:59 PM (14 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:
- 1b88289
- Parents:
- daa4ca9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
rdaa4ca9 r10a5413 410 410 } 411 411 412 uint_t 413 aubio_is_power_of_two(uint_t a) { 414 if ((a & a-1) == 0) { 415 return 1; 416 } else { 417 return 0; 418 } 419 } 420 421 uint_t 422 aubio_next_power_of_two(uint_t a) { 423 uint_t i; 424 a--; 425 for (i = 0; i < sizeof(uint_t) * CHAR_BIT; i++ ) { 426 a = a | a >> 1; 427 } 428 return a+1; 429 } 430 412 431 smpl_t 413 432 aubio_db_spl (fvec_t * o)
Note: See TracChangeset
for help on using the changeset viewer.