Can acquired be false if somethng failed? If so, then the application will be stuck in the while (!mix_opened) event loop on line 102.