Changeset 39be048
- Timestamp:
- Feb 27, 2017, 1:59:39 AM (8 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, sampler
- Children:
- 140b460
- Parents:
- 25d58dc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_source.py
r25d58dc r39be048 170 170 return total_frames 171 171 172 class aubio_source_with(aubio_source_test_case_base): 173 174 #@params(*list_of_sounds) 175 @params(*list_of_sounds) 176 def test_read_from_mono(self, filename): 177 total_frames = 0 178 hop_size = 2048 179 with source(filename, 0, hop_size) as input_source: 180 assert_equal(input_source.hop_size, hop_size) 181 #assert_equal(input_source.samplerate, samplerate) 182 total_frames = 0 183 for frames in input_source: 184 total_frames += frames.shape[-1] 185 # check we read as many samples as we expected 186 assert_equal(total_frames, input_source.duration) 187 172 188 if __name__ == '__main__': 173 189 main()
Note: See TracChangeset
for help on using the changeset viewer.