diff options
author | xegineering <me@xegineering.eu> | 2024-11-29 09:16:57 +0100 |
---|---|---|
committer | xegineering <me@xegineering.eu> | 2024-11-29 09:16:57 +0100 |
commit | 49dc5ae3c12f2c696302171b54b130d94dea05e0 (patch) | |
tree | 92b8ee24f25dc65e3035b3d67b6a3211c1ceb24c /LICENSE.txt | |
parent | 99031596efbcf004188217d2a9e53ac5ce33b511 (diff) | |
download | soundbox-go-49dc5ae3c12f2c696302171b54b130d94dea05e0.tar soundbox-go-49dc5ae3c12f2c696302171b54b130d94dea05e0.tar.zst soundbox-go-49dc5ae3c12f2c696302171b54b130d94dea05e0.zip |
Fix variable buffer size
The switch to `io.Copy()` to pump the data to the soundbox devices
removed the control over the buffer size of this copy action.
While for generic copy actions it is even an advantage when a big buffer
is used this is a problem for the soundbox use case. A big buffer used
during copy means that the first soundbox device gets audio data
significantly earlier than the later ones since `io.MultiWriter()` works
sequentially.
Thus this commit switches to `io.CopyBuffer()` where a buffer has to
provided. For that purpose the same buffer size is used as before the
refactoring to use `io.Copy()`.
Diffstat (limited to 'LICENSE.txt')
0 files changed, 0 insertions, 0 deletions