Can't play sound on libgdx android.
Sound sound = Gdx.audio.newSound(Gdx.files.internal("sound.wav"));
sound.play();
I've placed "sound.wav" to assets folder.
The problem was, that when i call Sound sound=Gdx.audio.newSound(Gdx.files.internal("sound.wav"));
it takes a while to load the sound, so I decided to load all sounds in my create() method and call sound.play()
when needed and it worked. Sorry for my stupidity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With