History

python/lib/aubio/slicing.py: use close not del, let garbage collector close the last file

Paul Brossier committed 12 years ago

Commit 16dda031 parent 7b562291 file · +1 −4Browse files

Showing the changes to python/lib (1 of 1 file). Show all

Unified · Split

python/lib/aubio/slicing.py+1−4
@@ -75,12 +75,9 @@ def slice_source_at_stamps(source_file, timestamps, timestamps_end = None, · 74 unmodified lines
75 g(vec[start:remaining], remaining - start)75 g(vec[start:remaining], remaining - start)
76 #print "closing region", "remaining", remaining76 #print "closing region", "remaining", remaining
77 # close this file77 # close this file
78 del g78 g.close()
79 elif read > start:79 elif read > start:
80 # write all the samples80 # write all the samples
81 g(vec[start:read], read - start)81 g(vec[start:read], read - start)
82 total_frames += read82 total_frames += read
83 if read < hopsize: break83 if read < hopsize: break
84
85 # close the last file
86 del g

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t