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

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. Streaming video

Hi all.

I need to add a feature to my app which streams video.

- One source I have has a file extension of m3u8. I'm unsure as to
whether Android can handle this?

-  I also have to handle an RTSP protocol. This isn't something I'm
too familiar with.

1) Is MediaPlayer the right Intent to be use for these streams?

2) I could really do with an example RTSP feed which is known to be
active - it's very hard to test my code otherwise. So any active feeds
you can point in my direction would be great (RSTP or otherwise).

Thanks in advance.


2. what is the source version at the website?

I use git clone the IM application from the source website. many errors
in source code. many obect methods are not in the sdk of above 1.5.

for example Cursor
Cursor c = mContentResolver.query(mMessageURI, projection, selection,
new String[]{Integer.toString(Imps.MessageType.POSTPONED)}, null);
if (c == null) {
Log.e(TAG, "Query error while querying postponed messages");

while (c.moveToNext()) {
String body = c.getString(1);
mAdaptee.sendMessageAsync(new Message(body));

c.updateLong(2, System.currentTimeMillis());
c.updateInt(3, Imps.MessageType.OUTGOING);

there are no Cursor.updateLong() updateInt commitUpdates . what is the


3. admob ads in android app not showing all the time

4. <compatible-screens> and <uses-gl-texture> ?

5. Proguard and Conversion to Dalvik format failed with error 1

6. How to Package .so files into .apk in linux

7. Problems by compiling native code