fixed logic controlling audio playback