correct audio data indices, minor cleanup