我使用这个方法来播放声音:
int streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, 0, 1f); 我没有问题播放短的声音。但如果我播放的音乐时间更长,它会在4.5秒时中断。与往常一样,不会显示错误或通知。
发布于 2014-11-28 01:00:32
假设你使用的是SoundPool,这是一个很基本的行为,它只适用于小片段。
Soundpool plays only first 5 secs of file. Why?
我也有同样的问题,如果你想播放更长的声音,你需要使用MediaPlayer
发布于 2016-05-23 19:04:44
尝试将采样率从44 the降低到32 the或更低。
https://stackoverflow.com/questions/27175693
复制相似问题