I'm developing mp3 music player for Android. I use MediaCodec for decoding mp3 and AudioTrack for playing.
My engine works fine for all phones / tablets. But on Alcatel OneTouch 7025D it works slow and wrong.
After some test I investigated, that MediaCodec give me to large buffer: 46080 (on other devices it is 4608).
By the way Alcatel OneTouch 7025D (Android 4.2.1) has new(2013) CPU: Quad-core 1.2 GHz Cortex-A7.
So what could be the problem?
Asked
Active
Viewed 238 times
0

Volodymyr Kulyk
- 6,455
- 3
- 36
- 63
-
Query the MediaCodec decoder with `codec.getCodecInfo().getName()`. What do you see? I'd think the CPU would be fast enough to handle MP3 even if you were getting a software decoder. Can you quantify what you mean by "wrong"? – fadden Apr 15 '14 at 18:18
-
@fadden :wrong" I mean it played 10 times the same note, so time of playing x10 and progress is so slowly. – Volodymyr Kulyk Apr 16 '14 at 05:51
-
@fadden I have crash on 'codec.getCodecInfo().getName()' : "AndroidRuntime" : "Caused by: java.lang.NoSuchMethodError: android.media.MediaCodec.getCodecInfo" – Volodymyr Kulyk Apr 16 '14 at 09:48
-
1Argh, `getCodecInfo()` wasn't added until API 18. The `MediaCodecInfo` doc (http://developer.android.com/reference/android/media/MediaCodecInfo.html) shows how to query for all codecs that handle a particular MIME type, but that doesn't necessarily tell you what you're actually using. – fadden Apr 16 '14 at 14:48
-
@fadden android:minSdkVersion="16". mime type is correct! – Volodymyr Kulyk Apr 16 '14 at 16:58