Patch from Chris Cannam to fix initialisation and empty result errors.
Fixed problems discovered using Vamp plugin tester.