I want to play 16 mp3 all together using android media player lib , these mp3 are saved locally in zip file . i am facing problem in android 5 and above .The problem is it only play's the last ,mp3 in the list , pausing and playing each mp3 after preparing is not a proper solution , i Need help .i have scratched my head for months now , its really ugly considering there is no error . length of the sounds is huge ,sound pool is not an option . below lolipop it seems to work fine . When debugged it seems to work fine , my guess is anroid art trying to screw with it , considering before 5 it use dalvik
public void musicstart(int id) {
switch (id) {
case R.id.rain:
player.setVolume(value, value);
player.setLooping(true);
player.start();
break;
}}
this particular method i run it in loop which plays sound which are being selected , max can be 16 at once . i have already prepared them .
我通过将.mp3
文件转换为.ogg
解决了此问题,并且一次可以播放多个.ogg
文件。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.