I've implemented an audio player that does decoding and decryption, so
writes to an AudioTrack object.  The decoding and decryption is done
in native code.  On the more powerful phones everything works fine,
but on the lower-power (e.g. HTC my touch) phones when I switch
activities the CPU becomes completely pegged and the audio becomes
crackly.  The first change was to keep the decoding and writing to the
AudioTrack entirely in native code, which seemed to help a little.
But, the audio still was bad, so, I re-factored out the portion of the
audio player class that is responsible for doing the actual playback
-- the rest of this class provides access to the meta data in the
file, which is in proprietary format -- and am running this as a
remote service.  The runs fine on the more powerful phones, but *only*
runs fine on the lower-power phones if I do the following:
 - start up the application
 - switch to another application
 - switch back to the application
 - start the audio player
Could anyone guess what switching to the other application does?  The
CPU usage graphs look the same for both the app and player processes
when doing this.

Thanks.
Jeff

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

Reply via email to