So far, I have come across many sources that recommend others to not use
load(String path, int priority)
. Not, I say, not. If you want the list of all the sources, feel me to PM me, and I'll give you at least 8 of them.I do see some benefits (easy to do, less hassle, etc.), but I'm not satisfied. It's my curiosity that piped me, in ensuring the above method mentioned really does work, as defined in the Android Developers Documentation.
Here's what I have worked out so far (My research):
--------------------------------
//These will not load. Gives error:
/* error loading <string goes here> */
/* sample 0 NOT ready */
sounds.play(sounds.load("assets/test", 1), 1f, 1f, 1, 0, 1f);
sounds.play(sounds.load("/assets/test", 1), 1f, 1f, 1, 0, 1f);
sounds.play(sounds.load("assets/test.wav", 1), 1f, 1f, 1, 0, 1f);
sounds.play(sounds.load("/assets/test.wav", 1), 1f, 1f, 1, 0, 1f);
[font=courier new,courier,monospace][color=#0000FF]sounds[font=arial,helvetica,sans-serif] is a SoundPool variable initialized in the onResume(). All of these methods are placed in a [font=courier new,courier,monospace]setOnClickListener.onClick(View v)[/font] wrapped/set for a [font=courier new,courier,monospace]Button[/font] object in the R.layout.main.[/font][/font]
[font=courier new,courier,monospace]test.wav [/font]is a WAV file placed directly in the /assets folder in an Android project. The Android project is generated by Eclipse by default. Nothing else was edited/changed.
--------------------------------
So, of course, I sat in my seat for how long it had been, pondering such a question. I decided, why not share my findings with you all, as it does not harm anybody at all? And here we are, and me initiating a challenge to all.
Who knows how to correctly use [font=courier new,courier,monospace]Soundpool.load(String path, int priority)[/font] method?
[size=1]I hope to see a few "Challenge Accepted" posts below. I know it's bad, but I like having fun...