• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps SoundPool class doesn't play some file in a loop.

arkashkin

Lurker
Hi,
I'm using a SoundPool class for playing music and some sounds in my game.
The strange thing is, I have 2 file, both of them are *.ogg :
1. button_click.ogg - 5.4KB
2. play_track1.ogg - 160.8KB

Some how when I'm trying to play the first one in a loop it does play,
but the second (play_track1.ogg), doesn't want to play at all if I wan't it to play in a loop.

I'm doing the playing like this:

Code:
        music1 = sounds.load(context, R.raw.play_track1, 1);
        button_click = sounds.load(context, R.raw.button_click, 1);
        sounds.play(music1, 1, 1, 1, -1, 1); //<--- doesn't works!
        sounds.play(button_click, 1, 1, 1, -1, 1); //<--- works.
Can some body help me with this?

Thanks.
 
Back
Top Bottom