To register and login, use your Google, Twitter, Facebook, LinkedIn, or OpenID credentials.

This is allowing us to stop most spam registrations. We've deleted most of the spam accounts that got through, and we're closely watching for more.

obtainBuffer() track disabled, restarting error Android

choonschoons Posts: 52
edited January 2013 in Pd Everywhere

Hi- I just got my app working on my phone but after about 30 seconds of playback I get multiple "obtainBuffer() track disabled, restarting" warnings in logcat and the audio stops and the app freezes. Anyone know why this is happening? My app setup is: patch with 8 tables containing wav files about 80 kb each, note data sent in from Java side triggers the samples, using the pdService setup from the book. Anyone else encountered this issue?


  • pbrinkmannpbrinkmann Posts: 686 ✭✭

    I've never seen that one before. What device and Android version are you using? Did you pull the latest version of libpd from GitHub? Also, please post your project somewhere so I can see whether I can reproduce this on any of my devices. Thanks!

  • choonschoons Posts: 52

    Hi Peter- writing for Gingerbread on a Samsung Galaxy Proclaim. My libpd is from way back late last April. Once I got it working in Eclipse, I didn't want to mess with it. I tried to do a git pull on it just now but it's giving me an error:

    error: Your local changes to the following files would be overwritten by merge:
    Please, commit your changes or stash them before you can merge.

    I'm hesitant to continually update libraries since I've had major headaches with my project code breaking because the author decided to completely overhaul the library. I recall that you were transitioning libpd to use OpenSL. Does the latest version even use Android's AudioTrack any more? That's the class throwing the error in my app.

    Don't want to post my code publicly as I intend this to be a commercial app.

  • choonschoons Posts: 52
    edited January 2013

    yeah so I realized I had commented out a warning line in Fixed that and did a git pull and now my project is broken. was out of sync so I accepted eclipse's recommendation and now all of PdCore is screwed up

    OK well I ended up updating eclipse, the SDK manager, the Android SDK, and libPd and it all seems to be working better. I notice that garbage collection is now more infrequent and I believe the GC had something to do with the crashes. Once I remembered how to update libPd with Git Bash, it worked fine without any code changes in my project. Definitely seems more stable than the April 2012 libPd version I had ; )

  • pbrinkmannpbrinkmann Posts: 686 ✭✭

    You definitely want to keep updating libpd on a very regular basis. There's a lot of stuff going on all the time. Almost all of it is under the hood so you won't need to change your code, but you'll still notice the occasional improvement.

    About AudioTrack, yes, it's still being used, but only for compatibility on pre-Gingerbread devices.

  • choonschoons Posts: 52

    well thank you for the great library and the effort to continually make it better!

  • Interesting note about AudioTrack. Thanks for the good work

Sign In or Register to comment.