improve handling of audio queue thread