Recommended Android music format - mp3, ogg or other? [closed]

余生颓废 提交于 2019-12-03 22:08:25

Ogg is the "free" choice, of course, and you are using Android. ;)

I'm not aware of any really significant differences in performance for decoding Ogg and Mp3 equivalent audio.

Mp3 might be the better choice if you intend to use your software on several platforms. The implementation would probably be more consistent than Ogg.

Android 2.3 and up uses OpenSL ES API, which has great support for MP3. All previous versions and bugs and difficulties with audio here and there. I would still go with MP3 for earlier API versions. Ogg would be a pain to implement. In fact, before Android 2.3 API (version 9, I believe), there were lots of complaints about developing any kind of audio applications for Android.

CORRECTION Android does have .ogg compatibility starting with API version 8.

SoundPool is known to have problems with MP3 files. I prefer using OGG files.

why not use .wav files :D

You can have it in a non encoded format, that you can play on the AudioTrack without any need for implementation of a decoder. I've made a music player, with several equalization effect where i use .wav files for playback.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!