Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Audio sometimes plays double speed on android emulator

Platform: Intel i7, Ubuntu 9.10, TiDev 1.3, Android 2.2

Hi there
Sometimes after my emulator loads, my app plays audio files (mp3s at 44100 sample rate) too fast. This is after it has been working fine, playing them at the right speed, for hours. I have not determined whether reloading the emulator or reloading the app can cause the issue, as I perform both actions periodically.

Furthermore, sometime the emulator starts up with all the graphics scaled down, including the unlock bar. This can be resolved by restarting the emulator - however many times it takes before the problem goes away.

I'd appreciate some help in understanding these issues, as it has really inhibited my progress with tidev.

Many thanks in advance

— asked June 6th 2010 by Paul Dowsett
  • android
  • audio
1 Comment
  • Note, I have the following output in the log:

    [TRACE] W/AudioTrack( 34): obtainBuffer timed out (is the CPU pegged?) 0x22e40 user=00003000, server=00000000
    — commented June 6th 2010 by Paul Dowsett

1 Answer

  • Accepted Answer

    Doing a little Googling, it seems that the AudioTrack error may have been introduced in Android 2.1, but it's not clear if it affects all devices/emulators.

    In general, all of your issues seem like Android emulator issues. Try dropping down to a 1.6 emulator for a bit and see if you experience the same problem. You might also check when the issues occur, did your machine start using swap, etc.

    — answered June 7th 2010 by Don Thorp
    1 Comment
    • If I play audio in the emulator it works to begin with (several hours) and then the problem occurs. As audio is not that important to me at present I just reboot the machine which solves the issue for several more hours.
      I haven't isolated the source of the issue unfortunately, but just mention the workaround here in case it's useful to anyone.

      — commented November 4th 2010 by Paul Dowsett
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.