diff options
-rw-r--r-- | soundbox/streaming.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/soundbox/streaming.go b/soundbox/streaming.go index 1a2d89e..357fa30 100644 --- a/soundbox/streaming.go +++ b/soundbox/streaming.go @@ -33,7 +33,8 @@ func streamContext(ctx context.Context, r io.Reader, targets []net.HardwareAddr) mw := io.MultiWriter(writers...) - _, err := io.Copy(mw, r) + buf := make([]byte, bufferSize) + _, err := io.CopyBuffer(mw, r, buf) return err } |