Someone is making a simple soundboard for me but when I try it on the emulator, it loads very slow(10+ seconds), and every sound that is longer than maybe 4 seconds gets cut off. The person mentioned that he is using SoundPool. Anyone know what is wrong and what might fix it?
Generally, Emulators are much slower than real devices.
I created a soundboard with soundPool and sounds were very slow and lagging on emulators while on my Samsung Galaxy S2 it was perfect !!
Try running it on real device
Related
OK, this one is a bit odd.
My app is an OpenGL ES 2.0 game and uses MediaPlayer to play the background music (not on a service as I want the music to stop when the app is send into the background) and SoundPool to play the (various, short) sound effects.
It's been tested on aprox 18 devices and a wide range of OS versions with no problems. However I recently ran it on a Hudl2 tablet with Lollipop installed and the performance was pretty bad (very choppy).
If I use my games settings to turn off the sound, it runs fine (strangely, if I leave the sound on and turn off the music, it also runs fine).
However, there are a lot of questions here relating to SoundPool causing lag, so I'm going with SoundPool being the likely cause.
Things I've tried are:
Playing a muted sound in my gameloop
Using MP3's instead of .OGG's
Reducing the number of simultaneous streams
Playing the sounds from the UI Thread (normally I call 'play' from the GL Thread)
Checking for API Level and using SoundPool.Builder when it detects API 21+ and the older constructor method when it finds an API of <21
Turning off USB Debugging and disconnecting from my dev computer
Removing my AdViews (in case they were causing the problem - clutching at straws here)
Disabling Hardware Acceleration in my manifest (more clutching at straws)
Unfortunately, nothing that I've listed makes any difference.
After much research, I found some people saying that soundPool should be run on a new thread, however, I already tried it on the UI thread and it made no difference at all.
The only other thing I can think of is that this is some kind of compatibility issues between the Hudl2 and Lollipop.
Does anyone have any other ideas as to what may be causing this lag on one specific device, with this specific OS Version (Lollipop)), or has anyone come across anything remotely similar? And if so are there any more suggestions?
Edit
I forgot to mention that I ran it on the same device (Hudl 2) with KitKat installed and it was perfectly fine. And on my Nexus 10 with Lollipop again, it's perfectly fine.
My libgdx game is running perfectly for somtimes on real devices. Samsung galaxy s# and Google nexus tab. But after opening my game again after some time my app freezes my samsung mobile and shows black screen on google nexus tablet.
I have carefully disposed Spritebatch, stage, and all textures and sound, also Assetloader as per my knowledge.
I have also tried checking my game after restarting my device. So my game runs perfect before but after restarting it is in same freez or black screen condition.
P.S : I am just using Google analytics in my game.
Any idea what can I do more? I have read many questions regarding it here and on Google and did whatever considerable solutions are available but no luck. I have also checked this Black Screen After Restart but no luck for me.
After installing on Nexus 7 RajawaliWallpaperTemplate from RajawaliWallpaperTemplate
it stops working after I rotate the device several time.
Says: Unfortunately ,Rajawali Wallpaper Template has stopped.
I can't fix, are there any solutions ?
Thank you.
our new game seems to be smooth on other phones but on samsung gaxalxy s2 it always freezes and crashes. the application uses gdx lib. the issue seems to be connected with the music.
while the music is turned off from the code the gameplay is smooth, but after turning it on the whole series of crashes and freezes start.
Any solutions or advice on this ?
You can check the game here Fish vs Pirates
Thanks in advance.
The Samsung Galaxy S2 has a known audio bug: http://code.google.com/p/android/issues/detail?id=17623
Supposedly using the MediaPlayer API instead of the SoundPool API is supposed to work-around the issue. There are also reports that this is fixed in the ICS update. (If you're not using the SoundPool API, then you're probably not seeing this particular issue.)
I'm testing on an HTC Sensation, running android 4.0.3.
I'm publishing using FlashDevelop 4.0.3 and using the Air Mobile AS3 App template.
All the application does is display a Rectangle using:
this.graphics.beginFill(0x00FF00);
this.graphics.drawRect(0, 0, 100, 100);
Just so I can see that its actually publishing something.
The app runs correctly if I publish to the desktop, however when I switch to publishing it to the phone, the problem I'm facing is that the application publishes and runs on the phone, but only for a few seconds.. usually about 4 seconds and then it crashes out.
The really weird thing is that it was working fine about a week ago.. I'm not sure what's changed since then, but yeah it started happening this morning, I tried everything I could think of... including stripping everything out of the app and also doing a factory reset of my phone... nothing seems to have helped...
has anyone else had this problem? or have any ideas on what might be causing it or how to fix it? any help would be greatly appreciated.
Cheers
Update:
it seems changing the render mode to "auto" instead of "direct" stops the crashing, which is great, however if you need to use direct for stage3d content this doesn't really help. anyone else having this issue?
Can you post the source code of your application? I do too have HTC Sensation but my firmware version is 2.3.6. It would be interesting to test it.
I just updated my XPERIA ARC to ICS and now I'm having problems with AIR apps as well. Seems the app is not getting the Click/Touch interactions. Some InteractiveObjects like TextInput gets the click and focus as it should, but Buttons are not working. And I'm using latest Flex/AIR sdks...
But I'm pretty sure we are in Adobe/Apache hands until they update the AIR with a fix.