From 630424d71f6f818999e6214616aebdcbb4028e2d Mon Sep 17 00:00:00 2001 From: Wessie Date: Fri, 31 May 2024 14:04:12 +0100 Subject: [PATCH] chore: go mod tidy streamer/audio: remove unused constants --- go.mod | 2 +- streamer/audio/pcm_buffer.go | 3 --- streamer/audio/pcm_test.go | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index f8516fd..3d3e511 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,7 @@ require ( github.com/google/subcommands v1.2.0 github.com/gorilla/csrf v1.7.2 github.com/jmoiron/sqlx v1.3.5 + github.com/justincormack/go-memfd v0.0.0-20170219213707-6e4af0518993 github.com/jxskiss/base62 v1.1.0 github.com/leanovate/gopter v0.2.10 github.com/lrstanley/girc v0.0.0-20240317214256-a4a3d96369cb @@ -73,7 +74,6 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/gorilla/securecookie v1.1.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/justincormack/go-memfd v0.0.0-20170219213707-6e4af0518993 // indirect github.com/klauspost/compress v1.17.7 // indirect github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a // indirect github.com/magiconair/properties v1.8.7 // indirect diff --git a/streamer/audio/pcm_buffer.go b/streamer/audio/pcm_buffer.go index 62d71d8..34c55db 100644 --- a/streamer/audio/pcm_buffer.go +++ b/streamer/audio/pcm_buffer.go @@ -5,9 +5,6 @@ import ( "time" ) -const pcmBootstrapSize = 1024 * 1024 -const pcmReadFromSize = 1024 * 16 - //const pcmReadFromSize = (44100 * 2 * 2) * 15 // about 15-seconds of data // PCMLength calculates the expected duration of a file diff --git a/streamer/audio/pcm_test.go b/streamer/audio/pcm_test.go index 843dd58..683cef4 100644 --- a/streamer/audio/pcm_test.go +++ b/streamer/audio/pcm_test.go @@ -8,6 +8,8 @@ import ( "github.com/stretchr/testify/require" ) +const pcmBootstrapSize = 1024 * 1024 + func TestPCMBuffer(t *testing.T) { var data = make([]byte, pcmBootstrapSize*2) n, err := rand.Read(data)