audio: Bug fix: bufferToInt16 can return smaller result

Fixes #854
This commit is contained in:
Hajime Hoshi 2019-04-29 00:32:52 +09:00
parent bd2e9a2745
commit 77b488c42a

View File

@ -87,6 +87,9 @@ func (m *mux) Read(b []byte) (int, error) {
if err != nil {
return 0, err
}
if l > len(buf)*2 {
l = len(buf) * 2
}
b16s = append(b16s, buf)
}