Javascript Chrome扩展webAudio API停止Windows节能模式

Javascript Chrome扩展webAudio API停止Windows节能模式,javascript,hibernate,google-chrome,google-chrome-extension,html5-audio,Javascript,Hibernate,Google Chrome,Google Chrome Extension,Html5 Audio,我的chrome扩展有问题。扩展创建一个audioContext,它使用以下代码连接到背景页上的标记。在音频端调用kill函数 播放时,我看到(预期)[DRIVER]高清音频设备(HDAUDIO\FUNC\u 01&venu 111D&DEV\u 76D5&SUBSYS\u 1028040A&REV\u 1001\4&143c5ca7&0&0001) 当前正在使用音频流。在windows系统上执行powercfg-requests时。然而,当调用kill函数时,我仍然看到相同的driver in

我的chrome扩展有问题。扩展创建一个audioContext,它使用以下代码连接到背景页上的
标记。在音频端调用kill函数

播放时,我看到(预期)
[DRIVER]高清音频设备(HDAUDIO\FUNC\u 01&venu 111D&DEV\u 76D5&SUBSYS\u 1028040A&REV\u 1001\4&143c5ca7&0&0001)
当前正在使用音频流。
在windows系统上执行
powercfg-requests
时。然而,当调用kill函数时,我仍然看到相同的driver in use消息,并且机器不会挂起/休眠/休眠

检查背景页面时,列出的变量(所有与音频相关的变量)都未定义。到目前为止,我找到的唯一解决办法就是重新加载背景页面——一个超级背包,我鄙视它所代表的一切

有没有人有类似的经验或对chrome webaudio API的内部恶魔有过了解

注意事项: 这些变量在演示代码的上下文中是全局的。在实时代码中,这些是本地范围

干杯, 菲尔

要释放
AudioContext
时调用

function kill_audio_context(){
    capAudio.remove();
    capAudio = undefined;
    try{
        analyser.disconnect();
        source.disconnect();
        audioContext = undefined;
        source=undefined; 
        analyser=undefined;
    }catch(e){console.log(e)} 
    // No errors, except expected when no audio element exists (first load)

    // KILL IT WITH FIRE!!
    //chrome.runtime.reload();
}
function load_audio_context(){
    audioContext = new AudioContext();
    analyser = audioContext.createAnalyser();
    analyser.fftSize = 2048;
    source = audioContext.createMediaElementSource(capAudio);
    source.connect(analyser);
    analyser.connect(audioContext.destination);
}