项目场景:
APP在交易成功,失败等条件下,需要有声音提示(短促音效,共4个),客户制作并提供了wav格式文件,自然的想到了用SoundPool预加载,之后需要的时候进行播放。
问题描述:
SoundPool在一段时间频繁的切换播放后,没有声音:
//初始化
public boolean init(Context context){
mSoundMap = new HashMap<>();
mAssetManager = context.getAssets();
mAudioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
mSoundPool = new SoundPool(MAX_NUM, AudioManager.STREAM_MUSIC, 0);
mSou