summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxegineering <me@xegineering.eu>2024-11-08 20:35:24 +0100
committerxegineering <me@xegineering.eu>2024-11-08 20:35:24 +0100
commite30a1b0768d35ec70e5d2c00e6ae87c0f267b881 (patch)
tree109e1c78871df0ca88d4fa23a184e8b8974686ee
parent702c39c9bb3a6441de366aa30842960741017615 (diff)
downloadsoundbox-go-e30a1b0768d35ec70e5d2c00e6ae87c0f267b881.tar
soundbox-go-e30a1b0768d35ec70e5d2c00e6ae87c0f267b881.tar.zst
soundbox-go-e30a1b0768d35ec70e5d2c00e6ae87c0f267b881.zip
Rename cmd to args
This variable only contains the arguments for the called program. Thus it should be named like this.
-rw-r--r--soundbox/stream.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/soundbox/stream.go b/soundbox/stream.go
index cc8fcea..4b08840 100644
--- a/soundbox/stream.go
+++ b/soundbox/stream.go
@@ -20,7 +20,7 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd
return err
}
- cmd := []string{
+ args := []string{
"-re",
"-i",
url,
@@ -32,11 +32,11 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd
return err
}
- cmd = append(cmd, "-acodec")
- cmd = append(cmd, "flac")
- cmd = append(cmd, "-f")
- cmd = append(cmd, "ogg")
- cmd = append(cmd, fmt.Sprintf(
+ args = append(args, "-acodec")
+ args = append(args, "flac")
+ args = append(args, "-f")
+ args = append(args, "ogg")
+ args = append(args, fmt.Sprintf(
"tcp://[%s%%%s]:%d",
ip,
iface.Name,
@@ -44,5 +44,5 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd
))
}
- return exec.CommandContext(ctx, "ffmpeg", cmd...).Run()
+ return exec.CommandContext(ctx, "ffmpeg", args...).Run()
}