finally fixed audio playback, still lots of smelly code though