python/lib/aubio/slicing.py: use close not del, let garbage collector close the last...
authorPaul Brossier <piem@piem.org>
Fri, 24 Jan 2014 01:23:35 +0000 (22:23 -0300)
committerPaul Brossier <piem@piem.org>
Fri, 24 Jan 2014 01:23:35 +0000 (22:23 -0300)
python/lib/aubio/slicing.py

index e96a0d8..7d1d0f9 100644 (file)
@@ -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