What does “AL lib: alc_cleanup: 1 device not closed” mean?

前端 未结 3 894
自闭症患者
自闭症患者 2021-01-02 11:06

I\'m trying to engage myself into the Libgdx OpenGL framework. I\'ve used LwjglApplication for creating some simple apps that render boxes, some meshes and some

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 11:55

    You should try always closing your app with the piece of code below:

    Gdx.app.exit();
    

    I usually put it in my pause() method, because there was no reason for my app to run in the background.

    This static method tells the framework that your application is planning on closing and will thus release all resources effectively. The error you're getting is because the JNI interface has loaded an OpenAL library, but the System is closed before that library is properly unloaded and released. I had the same problem as you did, but this solved it. As stated in the JavaDoc, the exit() method:

    Schedule[s] an exit from the application. On android, this will cause a call to pause() and dispose() some time in the future, it will not immediately finish your application.

提交回复
热议问题