some audio problems

by [EMAIL PROTECTED] » Mon, 03 Nov 2008 13:40:26 GMT


Sponsored Links
 dear all,

I've been writing a game and need to play an audio effect with some
event trigged,
and i use MediaPlayer class and mp3 source files to implement it.

i first create the MediaPlayer instance in the constructor and invoke
play() when the event is trigged.

but it happened again oftentimes to show the warning message in the
DDMS

obtainBuffer timed out (is CPU pegged?) user=00000101, server=00000001
write blocked for XX msecs

these two message,  the sound would still played, but delayed, so the
sound and visual  effect won't synchronized.

please give some commons to help, thanks!

--~--~---------~--~----~------------~-------~--~----~



some audio problems

by Dave » Tue, 04 Nov 2008 04:09:50 GMT


 It's likely that the CPU is saturated and can't keep up with audio. If
you have a choice, I suggest using OGG files because there is less
overhead involved in playing them.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


some audio problems

by Robert Green » Tue, 04 Nov 2008 05:24:39 GMT


 For games use small, low bitrate OGGs with SoundPool.




--~--~---------~--~----~------------~-------~--~----~



some audio problems

by Dave » Tue, 04 Nov 2008 08:59:38 GMT


 SoundPool is not recommended in 1.0. There are deadlock issues that
can cause your app thread to lock up.





--~--~---------~--~----~------------~-------~--~----~



some audio problems

by [EMAIL PROTECTED] » Tue, 04 Nov 2008 09:39:49 GMT


 thanks a lot, I'll keep trying with that stuff!






--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Access a Service across multiple Applications



You copy the AIDL file, put it in the same package as in the old
project, and use it in your new project. In the links I provided
earlier, you will see that the IScript AIDL file resides in both projects.


No, they don't. They are two separate Android applications, with two
separate APK files, two separate manifests, two separate source trees,
and two separate copies of the same AIDL file in the same package.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.0
Available!

-- 

2. how to install steel browser

i want to install steel browser in my android emulator .Can u guys
please help me with the steps involved

-- 

3. Application run

4. Uploading content onto android market

5. Custom Themes

6. Reg: Layouts

7. Specifying LinearLayout orientation in resource "values"