From 16dda037d1ce8a8762ed515212833aae09d3c021 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 23 Jan 2014 22:23:35 -0300 Subject: [PATCH] python/lib/aubio/slicing.py: use close not del, let garbage collector close the last file --- python/lib/aubio/slicing.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/lib/aubio/slicing.py b/python/lib/aubio/slicing.py index e96a0d8c..7d1d0f90 100644 --- a/python/lib/aubio/slicing.py +++ b/python/lib/aubio/slicing.py @@ -75,12 +75,9 @@ def slice_source_at_stamps(source_file, timestamps, timestamps_end = None, g(vec[start:remaining], remaining - start) #print "closing region", "remaining", remaining # close this file - del g + g.close() elif read > start: # write all the samples g(vec[start:read], read - start) total_frames += read if read < hopsize: break - - # close the last file - del g -- 2.11.0