I believe I solved my issue and wanted to post an update to all those
that come across this thread.  Previously I thought I had read
somewhere that the sound files needed to be .WAV files, and so that is
what I was using.  I wrote an app yesterday "SchottGunn" and decided
to go with using the SoundPool class to play the sounds.  I was
encountering the same issues with some sounds not loading and the
occasional hang up.

So for shits and giggles I decided to convert the sound files to .OGG,
which not only saved some space, but the sounds now load 100% of the
time and I have had no issues with the app crashing or hanging up.  So
thanks for all the input and I hope this information can help somebody
else out.


Regards,
~clark

On Feb 26, 2:38 pm, burton miller <[email protected]> wrote:
> i usesoundpoolheavily - and i have found that using a combination
> ofo mediaplayer - for one-shot, non-looping sounds, andsoundpoolonly
> for sounds that need to vary in pitch and volume on the fly is working
> pretty well.  if i didn't need to vary my sounds on the fly, then i
> would use only mediaplayer.
>
> i still don't dare stop or pause - i set the volume to zero when the
> sound is not in use, and restartsoundpoolat various strategic
> points.  egregious hacks to be sure, but not much choice right now.
>
> i can't wait for cupcake:)
>
> On Feb 26, 12:40 pm, Jon Colverson <[email protected]> wrote:
>
> > On Feb 26, 6:04 pm, clark <[email protected]> wrote:
>
> > > > SoundPoolhas been reliable for me, and I've not had any reports of
> > > > crashes. What are you using for the maxStreams constructor argument?
>
> > > I originally started out by using 20 for the maxStreams argument,
> > > although I only have two wav files to load into the pool at this
> > > time.  I was just planning for future use.
>
> > Are you playing back the sounds multiple times simultaneously?
> > maxStreams refers to the number of streams that can be playing
> > concurrently, not the number of different sounds loaded.
>
> > --
> > Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to