Mercurial > hg > svcore
comparison data/fileio/test/AudioFileReaderTest.h @ 1402:aadfb395e933
Fix some one-off memory leaks (including distracting ones in tests)
| author | Chris Cannam |
|---|---|
| date | Mon, 06 Mar 2017 17:37:23 +0000 |
| parents | 1c9bbbb6116a |
| children | 87ae75da6527 |
comparison
equal
deleted
inserted
replaced
| 1401:cc62d7862203 | 1402:aadfb395e933 |
|---|---|
| 285 // frames, except for mp3/aac files. We ask for quite a lot | 285 // frames, except for mp3/aac files. We ask for quite a lot |
| 286 // more, though, so we can (a) check that we only get the | 286 // more, though, so we can (a) check that we only get the |
| 287 // expected number back (if this is not mp3/aac) or (b) take | 287 // expected number back (if this is not mp3/aac) or (b) take |
| 288 // into account silence at beginning and end (if it is). | 288 // into account silence at beginning and end (if it is). |
| 289 floatvec_t test = reader->getInterleavedFrames(0, refFrames + 5000); | 289 floatvec_t test = reader->getInterleavedFrames(0, refFrames + 5000); |
| 290 | |
| 291 delete reader; | |
| 292 reader = 0; | |
| 293 | |
| 290 sv_frame_t read = test.size() / channels; | 294 sv_frame_t read = test.size() / channels; |
| 291 | 295 |
| 292 bool perceptual = (extension == "mp3" || | 296 bool perceptual = (extension == "mp3" || |
| 293 extension == "aac" || | 297 extension == "aac" || |
| 294 extension == "m4a"); | 298 extension == "m4a"); |
