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,9 +84,12 @@ end
function open(f::Function, args...)
file = AudioIO.open(args...)
try
f(file)
finally
close(file)
end
end
function af_open(args...)
warn("af_open is deprecated, please use AudioIO.open instead")