节拍器,声明了三个InnerAudioContext实例,分别播放不同的音效,ide测试速度在500次/秒没问题,但是手机200次/秒以上就不稳定,每次声音的间隔出偏差,安卓好一些,ios100多的时候还会出现时响时不响。文件是本地的
const myAudio1 = wx.createInnerAudioContext({
useWebAudioImplement: true
});
myAudio1.src = "pages/index/audio/586.mp3"
const myAudio2 = wx.createInnerAudioContext({
useWebAudioImplement: true
});
myAudio2.src = "pages/index/audio/187.mp3"
const myAudio3 = wx.createInnerAudioContext({
useWebAudioImplement: true
});
myAudio3.src = "pages/index/audio/strong.mp3"
moveBar() {
var that = this;
var test = that.data.count % 3
if (test === 0) {
myAudio1.play()
} else if (test === 1) {
myAudio2.play()
} else if (test === 2) {
myAudio3.play()
}
that.setData({
count: that.data.count + 1,
show: !that.data.show
})
},
// 开始
startHandle() {
var that = this;
Play = setInterval(function () {
that.moveBar();
}, time);
that .setData({
isPlay: true
})
},
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
你好,后面发现是什么原因了吗