I created music in create mode as follows:
music_background = Gdx.audio.newMusic(Gdx.files.internal("background_music.mp3")); music_background.setLooping(true);
the problem is that he does not play in the loop.
I also tried without a loop and instead registered for setOnCompletionListener , but it also fails to play. when I tried to reload the file as follows:
music_background = Gdx.audio.newMusic(Gdx.files.internal("background_music.mp3")); Inside this event, he worked, but only once.
I think the problem is that when its execution in the file will be destroyed ...
How can I play music in a loop? what am I doing wrong?
source share