Fixes to audio metering code

See commits for details