Skip to content

Commit

Permalink
Merge pull request #172 from gopxl/go-modules-to-v2
Browse files Browse the repository at this point in the history
Change package path to /v2
  • Loading branch information
MarkKremer authored Aug 3, 2024
2 parents 113489d + cab9051 commit c3904b6
Show file tree
Hide file tree
Showing 55 changed files with 109 additions and 106 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions buffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions compositors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ctrl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion effects/doppler.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion effects/equalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package effects
import (
"math"

"github.com/gopxl/beep"
"github.com/gopxl/beep/v2"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion effects/gain.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion effects/mono.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion effects/pan.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion effects/swap.go
Original file line number Diff line number Diff line change
@@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion effects/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions effects/transition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion effects/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions examples/doppler-stereo-room/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions examples/midi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions examples/speedy-player/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions examples/tone-player/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/1-hello-beep/a/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/1-hello-beep/b/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/2-composing-and-controlling/a/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/2-composing-and-controlling/b/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/2-composing-and-controlling/c/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorial/2-composing-and-controlling/d/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/3-to-buffer-or-not-to-buffer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions examples/tutorial/4-making-own-streamers/a/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/4-making-own-streamers/b/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/5-equalizer/mono/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions examples/tutorial/5-equalizer/stereo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion flac/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions flac/decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion generators/sawtooth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"math"

"github.com/gopxl/beep"
"github.com/gopxl/beep/v2"
)

type sawGenerator struct {
Expand Down
2 changes: 1 addition & 1 deletion generators/silence.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions generators/silence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion generators/sine.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"math"

"github.com/gopxl/beep"
"github.com/gopxl/beep/v2"
)

type sineGenerator struct {
Expand Down
Loading

0 comments on commit c3904b6

Please sign in to comment.