Little things can add a lot of otherwise unnoticed polish to the apps we use and the games we play on a daily basis. Thanks to animations, sound effects, music, and custom graphics, our software tends to feel more responsive and engaging. But sometimes a bug comes along and breaks a part of that experience. Today, we're going to take a look at one of the more user-facing bugs to sneak out with Android 4.3: automatically looping sounds are broken in numerous apps.

The issue comes up when making a simple call to the play() method of the SoundPool class. One of the parameters passed in during the call will set the chosen sound to automatically repeat, either continuously or for a specific number of times. The problem in Android 4.3 is that the sound will only ever play once, regardless of how many repetitions are expected. This video demonstrates the correct behavior on a Nexus 7 with Android 4.2.2, followed by the bug on a Nexus 4 with Android 4.3:

If you would like to try this out for yourself, I've written another sample application to try on your own devices. Yes, that sound in the video is of a windshield being broken. I've also uploaded the source code to Github.

This issue won't affect all apps and games because developers have a few options for generating sound. Many music players are likely to rely on the MediaPlayer class because it handles most of the heavy lifting for different formats, large files, and streaming over a network. Most game developers working with the NDK (Native Development Kit) are more likely to need very precise timing and minimal overhead, which means they will reach for OpenSL ES (the audio counterpart to OpenGL ES). But developers who simply need some background music and a few sound effects can take advantage of SoundPool, which is both easy to use and generally lightweight. Optionally, the AudioTrack class offers a bit more control at the cost of simplicity, and is actually what SoundPool uses behind the scenes.

Don't be too concerned about this bug, the Android team has already acknowledged the issue and posted a fix. Technically, the problem was located in the underlying AudioTrack class, but circumstances for hitting it were exposed due to the popular use of SoundPool. As noted by the Android team, developers may want to consider creating workarounds for devices running 4.3, which probably means programming manual looping routines of their own. Fortunately, of the relatively small pool of devices running Android 4.3 this early, all of them should progress to 4.3.1 shortly after it rolls out, ultimately eradicating the issue.

For now, be a bit forgiving of apps and don't be too surprised if things like background sounds go mysteriously silent. Like most transient bugs of this nature, they will be short-lived and easily forgotten. Try to give developers a bit of time to find solutions, and hope for Google's engineers to launch an update swiftly. Meanwhile, take another opportunity to enjoy some of the great new features Android 4.3 has to offer.

[AOSP Issue Tracker #58113, Bug Fix]

Cody Toombs
Cody is a Software Engineer and Writer with a mildly overwhelming obsession with smartphones and the mobile world. If he’s been pulled away from the computer for any length of time, you might find him talking about cocktails and movies, sometimes resulting in the consumption of both.

  • http://www.toysdiva.com Toys Samurai

    May be it really isn't a good idea for OEM to release major OS updates so soon after all. I remember seeing someone saying the Nexus program is like iOS's beta. The more I think about it, the more I think the guy who said that is a genius.

    • Cory_S

      I agree. I really don't get why people think there should be an upgrade weeks after release. Android 4.2 was a buggy mess, it wasn't until 4.2.1 (or arguably 4.2.2) that it became stable. It looks like 4.3 will be the same story.

    • Bjajjull

      The 4.x versions often contains more bugs than 4.x.x. 4.0, 4.1 and 4.2 wasn't released to anything except Nexus phones (correct me if I'm wrong). 4.1.2 is in most OEM phones/tablets with 4.1 and 4.2.2 in most OEM phones/tablets with 4.2.

      So 4.x is beta-ish.

      • mgamerz

        Well that's kind of obvious... it's a first version release. It will have bugs.

    • http://www.androidpolice.com/author/cody-toombs/ Cody Toombs

      Not trying to steal credit, but I've made that argument a few times. :)

      Where Apple is pretty adamant about keeping iOS previous strictly for developers, Google is more apt to share Android versions while they are still young. Combining that with the general enthusiasm among non-developers to upgrade as quickly as possible... It can feel like each release is more public than it is really meant to be.

  • Cory_S

    I noticed this last night with Freeciv. I figured it just didn't have sound...it looked like the type of game that may not have that level of polish.

  • Liquidretro

    I for one am expecting a 4.3 update before the end of the month. There is enough bugs here that are big enough to really matter.

  • mlj11

    Nice app, but why no option for Wilhelm Scream?!?! I give it 4 stars until fixed.


  • Preveen Rodrigo

    Ahhhh, that explains why the engine noise in Hill Climb Racing doesn't work anymore :)

  • pratik doshi

    hey guys gt a link to download anroid 4.3 for all devices..visit

  • Iwant431now

    I have this bug since 4.3 if i do a call and i use the external speaker on my nexus 4. The only way i currently found/use ( before going crazy with the loop sound ) to fix it, it's turn off the the phone and restart it. Thanks google for the awesome job done on beta testing your new os.