From 99031596efbcf004188217d2a9e53ac5ce33b511 Mon Sep 17 00:00:00 2001 From: xegineering Date: Thu, 28 Nov 2024 22:44:28 +0100 Subject: Replace custom code by io package functions This makes use of two functions from this package: - io.Copy() - io.MultiWriter() `io.Copy()` is used to move the data from whatever reader is provided. `io.Multiwriter()` solves the issue that we need to stream to multiple network connections at the same time (one for each soundbox). --- soundbox/url.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'soundbox/url.go') diff --git a/soundbox/url.go b/soundbox/url.go index 6fed442..b24b05d 100644 --- a/soundbox/url.go +++ b/soundbox/url.go @@ -33,7 +33,7 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd return err } - streamContext(ctx, stdout, targets) + _ = streamContext(ctx, stdout, targets) return cmd.Wait() } -- cgit v1.2.3-70-g09d2