Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: use WebAudio API for better audio playing #69

Open
lideming opened this issue May 11, 2021 · 1 comment
Open

Suggestion: use WebAudio API for better audio playing #69

lideming opened this issue May 11, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@lideming
Copy link

建议使用 WebAudio API 进行音频播放。

当前使用 <audio> 进行音频播放,调用 HTMLMediaElement.play() 后,浏览器首先需要先进行下载和解码等初始化操作然后才开始播放声音。这些初始化工作的耗时是不稳定的,所以不能精确控制每段音频播放的起始时间,很难将两段音频完美地拼接播放。

WebAudio 的好处就多了,可以通过调整 gain 让两段音频平滑拼接,也可以用各种滤波器做别的效果……

另外当前版本的音频状态管理有问题,#66 已经修了

@YunYouJun
Copy link
Owner

Yeah, 实际上我并没有使用过 WebAudio API

需要点时间了解如何使用(以及还有一堆其他更显著的需求要先完成)。

@YunYouJun YunYouJun added the enhancement New feature or request label May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants