[android-developers] Re: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-09-11 Thread Morpheo
Daniel, can you confirm the crashes are gone with your workaround (two
months ago from your post)?

Thanks!

On Jul 28, 12:16 am, Daniel daniel.ge.sm...@gmail.com wrote:
 FYI, i just finished implementing a replacement sound player with OpenSL ES
 using the NDK, and preliminary testing reports indicate that the crashes on
 the S2 have gone, so it sounds like the problem is with soundpool, and not
 at a lower level.
 I used a dynamically linked shared library since OpenSL is only supported on
 2.3 and above, and i did the resource loading (.ogg) myself (you can get
 OpenSL to load/decode the resources from the apk but there were some
 limitations with switching data sources in the audioplayer that i didn't
 want to work around)

-- 
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: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-27 Thread Daniel
FYI, i just finished implementing a replacement sound player with OpenSL ES 
using the NDK, and preliminary testing reports indicate that the crashes on 
the S2 have gone, so it sounds like the problem is with soundpool, and not 
at a lower level.
I used a dynamically linked shared library since OpenSL is only supported on 
2.3 and above, and i did the resource loading (.ogg) myself (you can get 
OpenSL to load/decode the resources from the apk but there were some 
limitations with switching data sources in the audioplayer that i didn't 
want to work around)

-- 
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: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-17 Thread dan raaka
can you provide the build fingerprint of the device you are testing and
being able to reproduce ?
Also code snippet will be helpful ...

-Dan


On Sat, Jul 16, 2011 at 9:53 PM, Daniel daniel.ge.sm...@gmail.com wrote:

 I have been getting reports of S2 crashes too... and based on this thread,
 and since i use SoundPool extensively, i'm pretty confident at this point
 that it is the cause.
 Has anyone been able to try native OpenSL ES audio, and seen better
 results? (Haven't got round to setting all that up yet since 2.3 adoption
 has been pretty slow). I guess it will depend on whether the problem is with
 SoundPool specifically or the lower level drivers.

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

[android-developers] Re: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-16 Thread Daniel
I have been getting reports of S2 crashes too... and based on this thread, 
and since i use SoundPool extensively, i'm pretty confident at this point 
that it is the cause.
Has anyone been able to try native OpenSL ES audio, and seen better results? 
(Haven't got round to setting all that up yet since 2.3 adoption has been 
pretty slow). I guess it will depend on whether the problem is with 
SoundPool specifically or the lower level drivers.

-- 
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: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-04 Thread Andy
* switching to mp3 96k PCM didn't help
* reduce max Streams to 8 didn't help

-- 
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: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-04 Thread a1
You may try to set even lower max streams value (like 4). This is basically 
trial and error - I've tested several combination of codecs and streams count 
(eg. raw mono pcm worked fine in my case but they are huge). Make sure you test 
on orginal samsung galaxy with 2.3 firmware as it tend to have similar problems.

-- 
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: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-04 Thread ziggy
I set number of max stream to 5 and play wav files,  the crash
probability is very low. About it crashes about once in one hour.


On Jul 4, 6:21 pm, a1 arco...@gmail.com wrote:
 Lower number of max streams to 8 and re-encode sounds to mp3 96k+, generally
 speaking sound drivers and player implementation on samsung device with
 android 2.3.x are nightmare, what I found out:

 - some OGG files that play on every other android device fail to load
 through MediaPlayer on SGS with 2.3
 - AAC files (mp4) causes frequently hangs during loading through sound pool
 on SGS with 2.3
 - some AAC files fail to play on Galaxy Tab with 2.3
 - OGG files causes crashes when played through sound pool on SGS2

-- 
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: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-04 Thread Andy
By setting  max streams to 4-5 there isn't really the point even use 
Soundpool anymore. Instead you can create 16 mediaplayers and play your 
soundfiles there.

So up to know there is no real stable workaround for me. A SoundPool with 4 
max Streams isn't a Soundpool anymore. In my game there are a lot more then 
4 parallel sounds, so by limiting the max Streams to 4 I would lower the 
game quality significant.

Maybe I have to write a MediaPlayer Pool as Workaround, we'll see.

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