The return of the curious case of the impossible ArrayIndexOutOfBoundsException

by RyanMcNally » Thu, 24 Feb 2011 03:28:12 GMT


Sponsored Links
 Hello again

The last oddity ( 



Other Threads

1. Simulate speech on emulator?

Hi,

My application records the audio data coming from Microphone, saves it
to an AMR file and then sends it to the server for results.

Is there a way I can change the AudioSource from microphone to some
audio file? This way I would be able to simulate the speech
functionality. OR in some way if I can feed audio into the mike it
will solve my purpose.

Thanks
Yasser
--~--~---------~--~----~------------~-------~--~----~

2. SoundPool.stop(streamId) intermittently never returns (freezes) on Android 1.5 on G1

I've been using SoundPool since Android 1.0 and have always used
workarounds to keep it from crashing.  In 1.5 it became officially
supported so I stopped using my hacks and instead used proper
playSound and stop() for loops.

As it turns out, when the number of streams is less than or equal to
the number of sounds being played concurrently, calling stop() on a
stream which is currently playing causes a freeze.  It never returns.

I found this out on my noisiest level of Light Racer 3D which, when
played with 3 players has:

3 Looping engine sounds
up to 4 charging sounds followed by up to 4 looping electricity sounds
up to 2 power-up sounds
up to 2 explosion sounds

Realistically, the most concurrent sounds being played would 9.  I
have my streams set to 10 to make sure that it's at the lowest setting
that supports everything.  I also use priorities on the samples, just
in case one is cut out.

After releasing the update to my game, I received feedback that on
that level sometimes the game would freeze.  I debugged it down to
that call to SoundPool.stop().

I know that in the past, I've seen SoundPool be sensitive to certain
OGGs that I've thrown at it.  Just re-encoding with a different
setting or a different encoding lib seemed to make a difference.

Either way, I found that SoundPool in its current state on 1.5 is not
bullet proof.  It can still freeze your application.

My workaround for stopping looping sounds is to setLoop(streamId, 0)
and setVolume(streamId, 0,0).  This seems to work fine.  I ran a
longevity test overnight last night, running the same level over and
over with the same soundpool.  It ran for 8 hours like that with no
freezing.

If the soundpool developer (sorry, I forgot your name) needs help in
reproducing this problem, I'd be happy to set up a project that very
quickly causes the error.

Another problem is that when an app running an infinitely looping (-1)
sound crashes, SoundPool will continue to play/loop that sound until
the phone is restarted.  Just thought I'd throw that out there.


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

3. about Intent.createChooser

4. for adc2 only: help the most

5. augmented reality frustum

6. XML Menu

7. costraint mis match