shithub: aubio

Download patch

ref: 79c04d8c06f019edd26ca29814555a4d8b83a5f5
parent: 8d29cfe3df450227c100acf2c9051737b0dd95d7
author: Paul Brossier <[email protected]>
date: Mon Feb 20 06:34:25 EST 2006

workaround to avoid crashing on silence cut
workaround to avoid crashing on silence cut


--- a/python/aubiocut
+++ b/python/aubiocut
@@ -108,7 +108,8 @@
 		params.storefunc=False
 	filetask = dotask(filename,params=params)
 	onsets = filetask.compute_all()
-	ofunc = filetask.ofunc
+	if not options.silencecut:
+		ofunc = filetask.ofunc
         #onsets, ofunc = getonsets(filename,threshold,silence,
         #        mode=mode[i],localmin=options.localmin,
         #        derivate=options.derivate,
@@ -131,7 +132,8 @@
                 onsets = newonsets
 
         lonsets.append(onsets)
-        lofunc.append(ofunc)
+	if not options.silencecut:
+		lofunc.append(ofunc)
 
 	# print times in second
 	if options.verbose: