Changeset 7e204d01
- Timestamp:
- May 16, 2008, 12:50:38 AM (17 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:
- 13e23b8
- Parents:
- cf2f1b8
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
rcf2f1b8 r7e204d01 420 420 uint_t zcr = 0; 421 421 for ( j = 1; j < input->length; j++ ) { 422 // previous was negative 423 if( input->data[i][j-1] <= 0. ) { 424 if ( input->data[i][j] > 0. ) { 422 // previous was strictly negative 423 if( input->data[i][j-1] < 0. ) { 424 // current is positive or null 425 if ( input->data[i][j] >= 0. ) { 425 426 zcr += 1; 426 427 } 427 //previous was positive 428 } else if ( input->data[i][j] <= 0. ) { 429 zcr += 1; 428 // previous was positive or null 429 } else { 430 // current is strictly negative 431 if ( input->data[i][j] < 0. ) { 432 zcr += 1; 433 } 430 434 } 431 435 }
Note: See TracChangeset
for help on using the changeset viewer.