Recorder.js库在iOS上运行良好,但是当我添加以下功能以增强声音效果时,录音机将无法正常工作。如何解决以下问题?
async function loadTransform(e, transformName, ...transformArgs) {
let outputSection = document.getElementById("output");
outputSection.style.display = "flex";
document.getElementById("body").style.overflow = "hidden";
if(!globalAudioBuffer) {
let ctx = new AudioContext();
globalAudioBuffer = await ctx.decodeAudioData(arrayBuffer);
}
let outputAudioBuffer = await window[transformName+"Transform"](globalAudioBuffer, ...transformArgs);
let outputWavBlob = await audioBufferToWaveBlob(outputAudioBuffer);
let audioUrl = window.URL.createObjectURL(outputWavBlob);
let audioTag = document.getElementById("audioTag");
audioTag.src = audioUrl;
audioTag.play();
audioTag.addEventListener('click', audioTag.play());
blob = outputWavBlob;
}