Hi Mark,

Thankyou very much for your reply.

I'll give the SoundPool a go today to see how it works.
However I'll usually only have 2 and definitely no more than 3 sounds
playing at the same time.  The sound files themselves may be large (ie
playing a song or something) and then playing a sound effect over the
top.

Cheers,

Peter.

On Jan 20, 11:35 pm, Mark Murphy <[email protected]> wrote:
> On Wed, Jan 19, 2011 at 11:12 PM, Peter Carpenter
>
> <[email protected]> wrote:
> > I need to provide the facility to play multiple sounds (which could be
> > large) concurrently and to know once each sound has finished playing.
>
> :: snip ::
>
> > I can’t use the soundpool as I want to detect when each sound has finished
> > playing.
>
> Use SoundPool and keep track of when the clips end on your own. You
> know the duration of the clip, since it is your clip. You know when
> you are starting up the sound, because you are the one starting
> playback. Hence, you know when the sound has finished playing, through
> addition.
>
> Bear in mind that Android hardware is not designed to play a "large"
> number of sounds "concurrently", due to slower CPUs and limited sound
> hardware. The objective of SoundPool is specifically to *not* play
> sounds, via a prioritization system, so high-priority sounds get
> played while low-priority sounds get dropped so the whole thing
> doesn't chew up all available CPU time. MediaPlayer is not designed to
> play a "large" number of sounds "concurrently" at all.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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