From cab905125b8d200cebdf5734fa3fe489f24f14fa Mon Sep 17 00:00:00 2001 From: Mark Kremer Date: Sat, 3 Aug 2024 15:04:48 +0200 Subject: [PATCH] Change package path to /v2 --- README.md | 2 +- buffer.go | 2 +- buffer_test.go | 4 ++-- compositors_test.go | 4 ++-- ctrl_test.go | 4 ++-- effects/doppler.go | 2 +- effects/equalizer.go | 2 +- effects/gain.go | 2 +- effects/mono.go | 2 +- effects/pan.go | 2 +- effects/swap.go | 2 +- effects/transition.go | 2 +- effects/transition_test.go | 8 ++++---- effects/volume.go | 2 +- examples/doppler-stereo-room/main.go | 9 +++++---- examples/midi/main.go | 6 +++--- examples/speedy-player/main.go | 8 ++++---- examples/tone-player/main.go | 6 +++--- examples/tutorial/1-hello-beep/a/main.go | 6 +++--- examples/tutorial/1-hello-beep/b/main.go | 6 +++--- examples/tutorial/2-composing-and-controlling/a/main.go | 6 +++--- examples/tutorial/2-composing-and-controlling/b/main.go | 6 +++--- examples/tutorial/2-composing-and-controlling/c/main.go | 6 +++--- examples/tutorial/2-composing-and-controlling/d/main.go | 8 ++++---- examples/tutorial/3-to-buffer-or-not-to-buffer/main.go | 6 +++--- examples/tutorial/4-making-own-streamers/a/main.go | 4 ++-- examples/tutorial/4-making-own-streamers/b/main.go | 6 +++--- examples/tutorial/5-equalizer/mono/main.go | 6 +++--- examples/tutorial/5-equalizer/stereo/main.go | 6 +++--- flac/decode.go | 2 +- flac/decode_test.go | 4 ++-- generators/sawtooth.go | 2 +- generators/silence.go | 2 +- generators/silence_test.go | 4 ++-- generators/sine.go | 2 +- generators/sine_test.go | 6 +++--- generators/square.go | 2 +- generators/triangle.go | 2 +- go.mod | 2 +- internal/testtools/asserts.go | 2 +- internal/testtools/sinks.go | 2 +- internal/testtools/streamers.go | 2 +- midi/decode.go | 2 +- mixer_test.go | 4 ++-- mp3/decode.go | 3 ++- mp3/decode_test.go | 4 ++-- resample_test.go | 4 ++-- speaker/speaker.go | 4 ++-- speaker/speaker_test.go | 2 +- vorbis/decode.go | 2 +- vorbis/decode_test.go | 4 ++-- wav/decode.go | 2 +- wav/decode_test.go | 4 ++-- wav/encode.go | 3 ++- wav/encode_test.go | 8 ++++---- 55 files changed, 109 insertions(+), 106 deletions(-) diff --git a/README.md b/README.md index 195fbcc..d4428dc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A little package that brings sound to any Go application. Suitable for playback and audio-processing. ``` -go get -u github.com/gopxl/beep +go get -u github.com/gopxl/beep/v2 ``` ## Features diff --git a/buffer.go b/buffer.go index f1aba9f..775e947 100644 --- a/buffer.go +++ b/buffer.go @@ -5,7 +5,7 @@ import ( "math" "time" - "github.com/gopxl/beep/internal/util" + "github.com/gopxl/beep/v2/internal/util" ) // SampleRate is the number of samples per second. diff --git a/buffer_test.go b/buffer_test.go index b40de94..7bd3ed0 100644 --- a/buffer_test.go +++ b/buffer_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep" - "github.com/gopxl/beep/generators" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/generators" ) type bufferFormatTestCase struct { diff --git a/compositors_test.go b/compositors_test.go index 4c27803..79e0830 100644 --- a/compositors_test.go +++ b/compositors_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/gopxl/beep" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/internal/testtools" ) func TestTake(t *testing.T) { diff --git a/ctrl_test.go b/ctrl_test.go index c871f2d..ae0929c 100644 --- a/ctrl_test.go +++ b/ctrl_test.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/gopxl/beep" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/internal/testtools" ) func TestCtrl_CanBePausedAndUnpaused(t *testing.T) { diff --git a/effects/doppler.go b/effects/doppler.go index 8aa6fcf..321aa21 100644 --- a/effects/doppler.go +++ b/effects/doppler.go @@ -1,6 +1,6 @@ package effects -import "github.com/gopxl/beep" +import "github.com/gopxl/beep/v2" // Doppler simulates a "sound at a distance". If the sound starts at a far distance, // it'll take some time to reach the ears of the listener. diff --git a/effects/equalizer.go b/effects/equalizer.go index fd49e6b..b89c811 100644 --- a/effects/equalizer.go +++ b/effects/equalizer.go @@ -3,7 +3,7 @@ package effects import ( "math" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) type ( diff --git a/effects/gain.go b/effects/gain.go index d07a4d7..4a41d39 100644 --- a/effects/gain.go +++ b/effects/gain.go @@ -1,6 +1,6 @@ package effects -import "github.com/gopxl/beep" +import "github.com/gopxl/beep/v2" // Gain amplifies the wrapped Streamer. The output of the wrapped Streamer gets multiplied by // 1+Gain. diff --git a/effects/mono.go b/effects/mono.go index 617c1df..9b1b520 100644 --- a/effects/mono.go +++ b/effects/mono.go @@ -1,6 +1,6 @@ package effects -import "github.com/gopxl/beep" +import "github.com/gopxl/beep/v2" // Mono converts the wrapped Streamer to a mono buffer // by downmixing the left and right channels together. diff --git a/effects/pan.go b/effects/pan.go index b9cd320..555f720 100644 --- a/effects/pan.go +++ b/effects/pan.go @@ -1,6 +1,6 @@ package effects -import "github.com/gopxl/beep" +import "github.com/gopxl/beep/v2" // Pan balances the wrapped Streamer between the left and the right channel. The Pan field value of // -1 means that both original channels go through the left channel. The value of +1 means the same diff --git a/effects/swap.go b/effects/swap.go index 897a1a2..4829697 100644 --- a/effects/swap.go +++ b/effects/swap.go @@ -1,6 +1,6 @@ package effects -import "github.com/gopxl/beep" +import "github.com/gopxl/beep/v2" // Swap swaps the left and right channel of the wrapped Streamer. // diff --git a/effects/transition.go b/effects/transition.go index 1aede34..d9ff5e6 100644 --- a/effects/transition.go +++ b/effects/transition.go @@ -3,7 +3,7 @@ package effects import ( "math" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) // TransitionFunc defines a function used in a transition to describe the progression curve diff --git a/effects/transition_test.go b/effects/transition_test.go index 018fd3b..873e1cf 100644 --- a/effects/transition_test.go +++ b/effects/transition_test.go @@ -3,10 +3,10 @@ package effects_test import ( "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/effects" - "github.com/gopxl/beep/generators" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/effects" + "github.com/gopxl/beep/v2/generators" + "github.com/gopxl/beep/v2/speaker" ) // Cross-fade between two sine tones. diff --git a/effects/volume.go b/effects/volume.go index 3f62647..b9bbb51 100644 --- a/effects/volume.go +++ b/effects/volume.go @@ -3,7 +3,7 @@ package effects import ( "math" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) // Volume adjusts the volume of the wrapped Streamer in a human-natural way. Human's perception of diff --git a/examples/doppler-stereo-room/main.go b/examples/doppler-stereo-room/main.go index a2dea27..21fce66 100644 --- a/examples/doppler-stereo-room/main.go +++ b/examples/doppler-stereo-room/main.go @@ -8,10 +8,11 @@ import ( "unicode" "github.com/gdamore/tcell/v2" - "github.com/gopxl/beep" - "github.com/gopxl/beep/effects" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/effects" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func multiplyChannels(left, right float64, s beep.Streamer) beep.Streamer { diff --git a/examples/midi/main.go b/examples/midi/main.go index b7bb837..b52ac07 100644 --- a/examples/midi/main.go +++ b/examples/midi/main.go @@ -6,9 +6,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/midi" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/midi" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/speedy-player/main.go b/examples/speedy-player/main.go index 4058d59..1b05836 100644 --- a/examples/speedy-player/main.go +++ b/examples/speedy-player/main.go @@ -8,10 +8,10 @@ import ( "github.com/gdamore/tcell/v2" - "github.com/gopxl/beep" - "github.com/gopxl/beep/effects" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/effects" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func drawTextLine(screen tcell.Screen, x, y int, s string, style tcell.Style) { diff --git a/examples/tone-player/main.go b/examples/tone-player/main.go index 11258f6..8485228 100644 --- a/examples/tone-player/main.go +++ b/examples/tone-player/main.go @@ -6,9 +6,9 @@ import ( "strconv" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/generators" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/generators" + "github.com/gopxl/beep/v2/speaker" ) func usage() { diff --git a/examples/tutorial/1-hello-beep/a/main.go b/examples/tutorial/1-hello-beep/a/main.go index a5f397d..3c87409 100644 --- a/examples/tutorial/1-hello-beep/a/main.go +++ b/examples/tutorial/1-hello-beep/a/main.go @@ -5,9 +5,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/tutorial/1-hello-beep/b/main.go b/examples/tutorial/1-hello-beep/b/main.go index 0f56653..fb2f702 100644 --- a/examples/tutorial/1-hello-beep/b/main.go +++ b/examples/tutorial/1-hello-beep/b/main.go @@ -5,9 +5,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/tutorial/2-composing-and-controlling/a/main.go b/examples/tutorial/2-composing-and-controlling/a/main.go index afcac2a..01c6072 100644 --- a/examples/tutorial/2-composing-and-controlling/a/main.go +++ b/examples/tutorial/2-composing-and-controlling/a/main.go @@ -6,9 +6,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/tutorial/2-composing-and-controlling/b/main.go b/examples/tutorial/2-composing-and-controlling/b/main.go index b959b73..f20986f 100644 --- a/examples/tutorial/2-composing-and-controlling/b/main.go +++ b/examples/tutorial/2-composing-and-controlling/b/main.go @@ -6,9 +6,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/tutorial/2-composing-and-controlling/c/main.go b/examples/tutorial/2-composing-and-controlling/c/main.go index 7332ff4..343a2d9 100644 --- a/examples/tutorial/2-composing-and-controlling/c/main.go +++ b/examples/tutorial/2-composing-and-controlling/c/main.go @@ -6,9 +6,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/tutorial/2-composing-and-controlling/d/main.go b/examples/tutorial/2-composing-and-controlling/d/main.go index 1a02c82..c19d017 100644 --- a/examples/tutorial/2-composing-and-controlling/d/main.go +++ b/examples/tutorial/2-composing-and-controlling/d/main.go @@ -6,10 +6,10 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/effects" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/effects" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/tutorial/3-to-buffer-or-not-to-buffer/main.go b/examples/tutorial/3-to-buffer-or-not-to-buffer/main.go index 29ae85c..ba0927f 100644 --- a/examples/tutorial/3-to-buffer-or-not-to-buffer/main.go +++ b/examples/tutorial/3-to-buffer-or-not-to-buffer/main.go @@ -6,9 +6,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) func main() { diff --git a/examples/tutorial/4-making-own-streamers/a/main.go b/examples/tutorial/4-making-own-streamers/a/main.go index 8f5e0d1..0e04e5e 100644 --- a/examples/tutorial/4-making-own-streamers/a/main.go +++ b/examples/tutorial/4-making-own-streamers/a/main.go @@ -4,8 +4,8 @@ import ( "math/rand" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/speaker" ) func Noise() beep.Streamer { diff --git a/examples/tutorial/4-making-own-streamers/b/main.go b/examples/tutorial/4-making-own-streamers/b/main.go index 89d1c78..c50a17a 100644 --- a/examples/tutorial/4-making-own-streamers/b/main.go +++ b/examples/tutorial/4-making-own-streamers/b/main.go @@ -5,9 +5,9 @@ import ( "os" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/mp3" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/mp3" + "github.com/gopxl/beep/v2/speaker" ) type Queue struct { diff --git a/examples/tutorial/5-equalizer/mono/main.go b/examples/tutorial/5-equalizer/mono/main.go index c47364e..13403a1 100644 --- a/examples/tutorial/5-equalizer/mono/main.go +++ b/examples/tutorial/5-equalizer/mono/main.go @@ -4,9 +4,9 @@ import ( "math/rand" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/effects" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/effects" + "github.com/gopxl/beep/v2/speaker" ) func noise() beep.Streamer { diff --git a/examples/tutorial/5-equalizer/stereo/main.go b/examples/tutorial/5-equalizer/stereo/main.go index 687619f..44a8ea7 100644 --- a/examples/tutorial/5-equalizer/stereo/main.go +++ b/examples/tutorial/5-equalizer/stereo/main.go @@ -4,9 +4,9 @@ import ( "math/rand" "time" - "github.com/gopxl/beep" - "github.com/gopxl/beep/effects" - "github.com/gopxl/beep/speaker" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/effects" + "github.com/gopxl/beep/v2/speaker" ) func noise() beep.Streamer { diff --git a/flac/decode.go b/flac/decode.go index 324172b..886d761 100644 --- a/flac/decode.go +++ b/flac/decode.go @@ -7,7 +7,7 @@ import ( "github.com/mewkiz/flac" "github.com/pkg/errors" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) // Decode takes a Reader containing audio data in FLAC format and returns a StreamSeekCloser, diff --git a/flac/decode_test.go b/flac/decode_test.go index 6fb16fe..f34bfe7 100644 --- a/flac/decode_test.go +++ b/flac/decode_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep/flac" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2/flac" + "github.com/gopxl/beep/v2/internal/testtools" ) func TestDecoder_ReturnBehaviour(t *testing.T) { diff --git a/generators/sawtooth.go b/generators/sawtooth.go index a1870ba..0adb6dd 100644 --- a/generators/sawtooth.go +++ b/generators/sawtooth.go @@ -4,7 +4,7 @@ import ( "errors" "math" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) type sawGenerator struct { diff --git a/generators/silence.go b/generators/silence.go index d36cea3..19f64d5 100644 --- a/generators/silence.go +++ b/generators/silence.go @@ -1,6 +1,6 @@ package generators -import "github.com/gopxl/beep" +import "github.com/gopxl/beep/v2" // Silence returns a Streamer which streams num samples of silence. If num is negative, silence is // streamed forever. diff --git a/generators/silence_test.go b/generators/silence_test.go index 9d7c43e..d7553cc 100644 --- a/generators/silence_test.go +++ b/generators/silence_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep/generators" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2/generators" + "github.com/gopxl/beep/v2/internal/testtools" ) func TestSilence_StreamsFiniteSamples(t *testing.T) { diff --git a/generators/sine.go b/generators/sine.go index f80663d..ff53fee 100644 --- a/generators/sine.go +++ b/generators/sine.go @@ -4,7 +4,7 @@ import ( "errors" "math" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) type sineGenerator struct { diff --git a/generators/sine_test.go b/generators/sine_test.go index c2b0aef..56da4d3 100644 --- a/generators/sine_test.go +++ b/generators/sine_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep" - "github.com/gopxl/beep/generators" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/generators" + "github.com/gopxl/beep/v2/internal/testtools" ) func TestSineTone(t *testing.T) { diff --git a/generators/square.go b/generators/square.go index 30e15c6..4d2f06f 100644 --- a/generators/square.go +++ b/generators/square.go @@ -4,7 +4,7 @@ import ( "errors" "math" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) type squareGenerator struct { diff --git a/generators/triangle.go b/generators/triangle.go index b418d85..4489326 100644 --- a/generators/triangle.go +++ b/generators/triangle.go @@ -4,7 +4,7 @@ import ( "errors" "math" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) type triangleGenerator struct { diff --git a/go.mod b/go.mod index 5fe7c67..1433dca 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/gopxl/beep +module github.com/gopxl/beep/v2 go 1.21 diff --git a/internal/testtools/asserts.go b/internal/testtools/asserts.go index d5bfe43..033adc7 100644 --- a/internal/testtools/asserts.go +++ b/internal/testtools/asserts.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) // AssertStreamerHasCorrectReturnBehaviour tests whether the return values returned diff --git a/internal/testtools/sinks.go b/internal/testtools/sinks.go index cb31272..3e78f90 100644 --- a/internal/testtools/sinks.go +++ b/internal/testtools/sinks.go @@ -1,6 +1,6 @@ package testtools -import "github.com/gopxl/beep" +import "github.com/gopxl/beep/v2" // Collect drains Streamer s and returns all the samples it streamed. func Collect(s beep.Streamer) [][2]float64 { diff --git a/internal/testtools/streamers.go b/internal/testtools/streamers.go index b68cfc6..f5d49fa 100644 --- a/internal/testtools/streamers.go +++ b/internal/testtools/streamers.go @@ -3,7 +3,7 @@ package testtools import ( "math/rand" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) // RandomDataStreamer generates numSamples random samples and returns a StreamSeeker to stream them. diff --git a/midi/decode.go b/midi/decode.go index 8847b1d..8b8b686 100644 --- a/midi/decode.go +++ b/midi/decode.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "github.com/samhocevar/go-meltysynth/meltysynth" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) const ( diff --git a/mixer_test.go b/mixer_test.go index e19218e..18b7905 100644 --- a/mixer_test.go +++ b/mixer_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/internal/testtools" ) func TestMixer_MixesSamples(t *testing.T) { diff --git a/mp3/decode.go b/mp3/decode.go index f56c8d3..b384da8 100644 --- a/mp3/decode.go +++ b/mp3/decode.go @@ -5,9 +5,10 @@ import ( "fmt" "io" - "github.com/gopxl/beep" gomp3 "github.com/hajimehoshi/go-mp3" "github.com/pkg/errors" + + "github.com/gopxl/beep/v2" ) const ( diff --git a/mp3/decode_test.go b/mp3/decode_test.go index 3384f7e..b8163d6 100644 --- a/mp3/decode_test.go +++ b/mp3/decode_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep/internal/testtools" - "github.com/gopxl/beep/mp3" + "github.com/gopxl/beep/v2/internal/testtools" + "github.com/gopxl/beep/v2/mp3" ) func TestDecoder_ReturnBehaviour(t *testing.T) { diff --git a/resample_test.go b/resample_test.go index e9724c3..e1fe2f0 100644 --- a/resample_test.go +++ b/resample_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/gopxl/beep" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/internal/testtools" ) func TestResample(t *testing.T) { diff --git a/speaker/speaker.go b/speaker/speaker.go index 0503a70..4e81900 100644 --- a/speaker/speaker.go +++ b/speaker/speaker.go @@ -9,8 +9,8 @@ import ( "github.com/ebitengine/oto/v3" "github.com/pkg/errors" - "github.com/gopxl/beep" - "github.com/gopxl/beep/internal/util" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/internal/util" ) const channelCount = 2 diff --git a/speaker/speaker_test.go b/speaker/speaker_test.go index 6a41216..02c3ec3 100644 --- a/speaker/speaker_test.go +++ b/speaker/speaker_test.go @@ -5,7 +5,7 @@ import ( "io" "testing" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2/internal/testtools" ) func BenchmarkSampleReader_Read(b *testing.B) { diff --git a/vorbis/decode.go b/vorbis/decode.go index e2ebd7d..cb0c5dc 100644 --- a/vorbis/decode.go +++ b/vorbis/decode.go @@ -7,7 +7,7 @@ import ( "github.com/jfreymuth/oggvorbis" "github.com/pkg/errors" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) const ( diff --git a/vorbis/decode_test.go b/vorbis/decode_test.go index 6b6e428..6b7f1e4 100644 --- a/vorbis/decode_test.go +++ b/vorbis/decode_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gopxl/beep/internal/testtools" - "github.com/gopxl/beep/vorbis" + "github.com/gopxl/beep/v2/internal/testtools" + "github.com/gopxl/beep/v2/vorbis" ) func TestDecoder_ReturnBehaviour(t *testing.T) { diff --git a/wav/decode.go b/wav/decode.go index 9d6f2f8..ffc3df8 100644 --- a/wav/decode.go +++ b/wav/decode.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" - "github.com/gopxl/beep" + "github.com/gopxl/beep/v2" ) // Decode takes a Reader containing audio data in WAVE format and returns a StreamSeekCloser, diff --git a/wav/decode_test.go b/wav/decode_test.go index ceff4a9..8eb16c7 100644 --- a/wav/decode_test.go +++ b/wav/decode_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/gopxl/beep" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/internal/testtools" "github.com/stretchr/testify/assert" ) diff --git a/wav/encode.go b/wav/encode.go index b9de7d7..bffb407 100644 --- a/wav/encode.go +++ b/wav/encode.go @@ -6,8 +6,9 @@ import ( "fmt" "io" - "github.com/gopxl/beep" "github.com/pkg/errors" + + "github.com/gopxl/beep/v2" ) // Encode writes all audio streamed from s to w in WAVE format. diff --git a/wav/encode_test.go b/wav/encode_test.go index 8563ef4..50fc88e 100644 --- a/wav/encode_test.go +++ b/wav/encode_test.go @@ -5,10 +5,10 @@ import ( "math" "testing" - "github.com/gopxl/beep" - "github.com/gopxl/beep/effects" - "github.com/gopxl/beep/generators" - "github.com/gopxl/beep/internal/testtools" + "github.com/gopxl/beep/v2" + "github.com/gopxl/beep/v2/effects" + "github.com/gopxl/beep/v2/generators" + "github.com/gopxl/beep/v2/internal/testtools" "github.com/orcaman/writerseeker" "github.com/stretchr/testify/assert"