adds try-finally to open so it's actually safe

This commit is contained in:
Spencer Russell 2014-08-21 01:05:03 -04:00
parent 2620e6ecb2
commit dd28b530ea

View file

@ -84,8 +84,11 @@ end
function open(f::Function, args...)
file = AudioIO.open(args...)
f(file)
close(file)
try
f(file)
finally
close(file)
end
end
function af_open(args...)