Changeset 61abfa4 for tests/src/effects/test-timestretch.c
- Timestamp:
- Oct 3, 2016, 11:20:57 AM (8 years ago)
- Branches:
- sampler
- Children:
- 923670d
- Parents:
- b21c751
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/effects/test-timestretch.c
rb21c751 r61abfa4 52 52 if (transpose != 0) aubio_timestretch_set_transpose(ps, transpose); 53 53 54 #if 0 54 55 do { 56 if (aubio_timestretch_get_opened(ps) == 0) 57 PRINT_MSG("not opened!\n"); 58 aubio_timestretch_get_opened(ps); 55 59 aubio_timestretch_set_stretch(ps, stretch); 56 60 aubio_timestretch_set_transpose(ps, transpose); 57 61 aubio_timestretch_do(ps, out, &read); 62 if (samplerate == 0) { 63 PRINT_MSG("setting samplerate now to %d\n", aubio_timestretch_get_samplerate(ps)); 64 samplerate = aubio_timestretch_get_samplerate(ps); 65 aubio_sink_preset_samplerate(o, samplerate); 66 aubio_sink_preset_channels(o, 1); 67 } 58 68 aubio_sink_do(o, out, read); 59 69 n_frames += read; 60 70 } while ( read == hop_size ); 71 #else 72 73 aubio_timestretch_queue(ps, source_path, samplerate); 74 75 do { 76 aubio_timestretch_get_opened(ps); 77 aubio_timestretch_set_stretch(ps, stretch); 78 aubio_timestretch_set_transpose(ps, transpose); 79 aubio_timestretch_do(ps, out, &read); 80 if (n_frames == 34999 * hop_size) { 81 PRINT_MSG("instant queuing?\n"); 82 aubio_timestretch_queue(ps, source_path, samplerate); 83 } 84 if (n_frames == 64999 * hop_size) { 85 PRINT_MSG("instant queuing 2\n"); 86 aubio_timestretch_queue(ps, "/dev/null", samplerate); 87 } 88 if (n_frames == 54999 * hop_size) { 89 PRINT_MSG("instant queuing?\n"); 90 aubio_timestretch_queue(ps, source_path, samplerate); 91 } 92 if (n_frames == 74999 * hop_size) { 93 PRINT_MSG("instant queuing?\n"); 94 aubio_timestretch_queue(ps, source_path, samplerate); 95 } 96 aubio_sink_do(o, out, read); 97 //} while ( read == hop_size ); 98 n_frames += hop_size; 99 } while ( n_frames < 100000 * hop_size); 100 #endif 61 101 62 102 PRINT_MSG("wrote %d frames at %dHz (%d blocks) from %s written to %s\n",
Note: See TracChangeset
for help on using the changeset viewer.