audio: Fix comments

This commit is contained in:
Hajime Hoshi 2017-12-17 01:24:45 +09:00
parent 9471e3e4e7
commit 7b76b7822f

View File

@ -246,7 +246,7 @@ func (c *Context) loop() {
// This is a heuristic decision of audio buffer size. // This is a heuristic decision of audio buffer size.
// On most desktops, 1/30[s] is enough but there are some known environment that is too short (e.g. Windows on Parallels). // On most desktops, 1/30[s] is enough but there are some known environment that is too short (e.g. Windows on Parallels).
// On desktop browsers, 1/15[s] should work with any sample rate except for mobile browsers. // On browsers, 1/15[s] should work with any sample rate except for Android Chrome.
// On mobiles, we don't have enough data. For iOS, 1/30[s] is too short and 1/20[s] seems fine. 1/15[s] is safer. // On mobiles, we don't have enough data. For iOS, 1/30[s] is too short and 1/20[s] seems fine. 1/15[s] is safer.
bufferSize := c.sampleRate * channelNum * bytesPerSample / 15 bufferSize := c.sampleRate * channelNum * bytesPerSample / 15
if web.IsAndroidChrome() { if web.IsAndroidChrome() {