What is difference between Sound and Music types in LibGDX?
Music gameMusic = Gdx.audio.newMusic(Gdx.files.internal("sound/gamemusic.mp3")); gameMusic.play();
This worked both on desktop and Android but this one
Sound gameMusic = Gdx.audio.newSound(Gdx.files.internal("sound/gamemusic.mp3")); gameMusic.play();
this worked on desktop but doesnt play sound on android.
Music is streamed, while Sound is loaded into memory. (Because Android with libgdx has limit of 1mb file for 'sound', Music can be of greater size)
It is said so here:
And according to another question on SO, you must wait a frame before you can play a Sound directly after loading: No Sound in Android Application with Libgdx