[android-developers] Re: Using MediaPlayer - multiple sound files
Yes this is exactly my problem... SoundPool either cuts off the sample after about 5 seconds, or complains that it's too big. I'll try your suggestion, though I can't have delays so I may have to stick with lots of MP objects. Thanks. On Mar 11, 7:08 am, Nightwolf wrote: > Another way is to use single MediaPlayer and call reset(), > setDataSource(), prepare() and start(). > There could be some delays though, at least for the first time. > > BTW the last time I tried SoundPool it was impossible to have more > than 1 MB of sounds. SoundPool uses uncompressed audio and I didn't > find a way to control bitrate and other stuff. I wanted five 17-18 sec > samples and that was impossible with SoundPool. > > On 11 ÍÁÒ, 02:50, Neilz wrote: > > > Anyone? I'm sure this must be a common problem... > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Using MediaPlayer - multiple sound files
Another way is to use single MediaPlayer and call reset(), setDataSource(), prepare() and start(). There could be some delays though, at least for the first time. BTW the last time I tried SoundPool it was impossible to have more than 1 MB of sounds. SoundPool uses uncompressed audio and I didn't find a way to control bitrate and other stuff. I wanted five 17-18 sec samples and that was impossible with SoundPool. On 11 мар, 02:50, Neilz wrote: > Anyone? I'm sure this must be a common problem... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Using MediaPlayer - multiple sound files
You can prepare Mediaplayer asynchronously and store them in a collection. after that call MediaPlayer.start() wherever needed. On Thu, Mar 11, 2010 at 5:29 AM, Mark Murphy wrote: > Neilz wrote: > > Anyone? I'm sure this must be a common problem... > > Actually, this is the first I've heard of a file too big for SoundPool. > > How have you determined that file size is your issue? > > With respect to MediaPlayer, it's possible that having a whole bunch of > MediaPlayer objects will be OK, but I am very skeptical. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 2.0 Available! > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Using MediaPlayer - multiple sound files
Neilz wrote: > Anyone? I'm sure this must be a common problem... Actually, this is the first I've heard of a file too big for SoundPool. How have you determined that file size is your issue? With respect to MediaPlayer, it's possible that having a whole bunch of MediaPlayer objects will be OK, but I am very skeptical. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.0 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Using MediaPlayer - multiple sound files
Anyone? I'm sure this must be a common problem... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en