Fixed segfault if audio api changes mid-frame