Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Monday, May 25, 2015

Solution for choppy/breaking/stuttering audio on Android for software engineers

If you are a software engineer and you are facing with choppy audio on Android and the only clue is the following line in the logcat:
E/AudioSink(54): received unknown event type: 1 inside CallbackWrapper !
then, don't be sad - you don't have to dig Android sources (you can do that, but is it what you really want to do?) to fix buffer underruns in media system ("1" is AudioTrack::EVENT_UNDERRUN).

I highly recommend to switch from MediaPlayer implementation to OpenMXPlayer, it did solve the problem with choppy audio for me. It has the same API as MediaPlayer, so it shall be super fast for you to try it out and finally switch (when you like it) to OpenMXPlayer.

You can find more details here:

  1. Code (License is GNU LGPL) https://code.google.com/p/android-openmxplayer/
  2. http://www.pocketmagic.net/android-audio-player-using-mediacodec-mediaextractor/


It's constructed based on the MediaCodec Api, so it can be used with Android 4.1 or newer. It's fast, easy to understand and robust, making it an excellent choice for your multimedia applications, regardless of the audio source you are targeting: local files or online audio streaming.

If you have other solution or you know some OpenMXPlayer issues, feel free to leave a comment.

Saturday, December 15, 2012

Bad Piggies, When Pigs Fly: solution for level 12

It was not so obvious that it is possible to stack those ballons (If you are wondering how did I take a screenshot on Android, you can find answer in one of previous posts).



Wednesday, September 19, 2012

How to take screenshot on Android 4.0 without app?

Just press "Power" button and "Home" button. Screenshot will be saved in the Camera gallery.

Works perfectly on HTC One.