MediaStream API - 标准采样率

MediaStreamAPI - Standard SampleRate

定义一个sampleRate will be available in future. At this moment what is the standard sampleRate when we capture audio from mic? When I put this audio in WebAudioAPI and use sampleRate()我一直都是480000。所以,480000是MediaStreamAPI的标准?还是取决于其他因素?

在网络音频中,默认音频上下文采样率是默认输出设备的采样率(和时钟)。输入被重新采样到输出速率;所以简而言之,采样率将取决于用户的输出设备。实际上,它在台式机上通常是 44.1kHz。

媒体流/对等连接代码可能会根据协商的音频编解码器重新采样。所以JS中remote peer接收到的音频流的采样率可能和"capturer"采样率不一样。如上所述,音频接收器也可能在播放流时重新采样。