惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Engineering at Meta
Engineering at Meta
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
M
MIT News - Artificial intelligence
IT之家
IT之家
博客园 - 【当耐特】
U
Unit 42
云风的 BLOG
云风的 BLOG
L
LangChain Blog
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
宝玉的分享
宝玉的分享
N
Netflix TechBlog - Medium

时间的朋友

Windows 命令行密码重置 Anaconda安装 typescript 注解解读1 Konvajs Shape加载自定义图片 sshpass 使用 why-is-node-running webgl笔记 SharedArrayBuffer is not defined blender 常用快捷键 | 时间的朋友 vue -- v3.4commit提交记录2 vue2 升级vue3报错问题整理 着色器 expressjs 源码 hyper-V arch linux 网络配置 element input数字格式化 three 拼接货架 Windows nginx重启bat脚本 vue -- v3.4commit提交记录 URI malformed vue3 -- Class 对象在组件中使用范例 | 时间的朋友 ruby 安装和升级 element-plus 老版本cascader使用卡死问题 vue3 内置Transition组件 | 时间的朋友 前端memo的实现 | 时间的朋友 Vue -- vue-class-component源码 | 时间的朋友 linux 优化脚本 typescript 装饰器 | 时间的朋友 microbundle 源码 | 时间的朋友 WSL2问题解决WslRegisterDistribution failed with error: 0x800701bc vue -- vue3利用createVNode函数,建立命令式调用组件 | 时间的朋友
WebAudio笔记
2023-12-21 · via 时间的朋友

WebAudio 笔记 🔗

MediaElementAudioSourceNode 🔗

用于传入媒体元素,可以通过代码调整媒体元素播放的参数,和audioCtx.createMediaElementSource 行为类似

1
2
3
4
5
6
const ac = new AudioContext();
const el = document.querySelector('audio')
const s = new MediaElementAudioSourceNode(ac, {
  mediaElement: el,
});
s.connect(ac.destination);

AnalyserNode 🔗

https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode

可以获得实时频率和时域分析,它不会改变输入输出的音频流,你可以获取生存音频可视化

fftSize 🔗

无符号值。必须是2^5和2^15之间的2的幂,为以下数字之一:32、64、128、256、512、1024、2048、4096、8192、16384和32768。默认2048

frequencyBinCount 🔗

只读属性,为fftSize的一半,因此是16、32、64、128、256、512、1024、2048、4096、8192和16384之一。

maxDecibels 🔗

最大分贝。音频默认最大分贝,默认30db,超出最大分贝时,getByteFrequencyData就会返回255

默认值-30

minDecibels 🔗

最小分贝。默认-100dB,当小于最小分贝时,返回0

smoothingTimeConstant 🔗

浮点数表示最新分析的帧的平均值。默认是0.8,范围0-1