Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用网络音频 api 'noteOn(time)' 播放声音,但我不确定时间单位是什么。
是毫秒吗?还是第二?
这是几秒钟。
时间与音频上下文的 currentTime 相关,可以这样访问:
var context = new audioContext(); //.... note.noteOn(context.currentTime); //will play now //.... note.noteOn(context.currentTime + 1); //will play in one second