Skip to content

Commit

Permalink
audio: Bug fix: bufferToInt16 can return smaller result
Browse files Browse the repository at this point in the history
Fixes #854
  • Loading branch information
hajimehoshi committed Apr 28, 2019
1 parent bd2e9a2 commit 77b488c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions audio/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 77b488c

Please # to comment.