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/commonsguy http://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

