Skip to content

Commit 7e605c0

Browse files
committed
Rename package wav to audio
1 parent c794d27 commit 7e605c0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cmd/wavelet/points.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"net/http"
66
"os"
77

8+
"github.com/soundcloud/wavelet/lib/audio"
89
"github.com/soundcloud/wavelet/lib/sampler"
9-
"github.com/soundcloud/wavelet/lib/wav"
1010
)
1111

1212
func points(w http.ResponseWriter, req *http.Request) {
@@ -16,7 +16,7 @@ func points(w http.ResponseWriter, req *http.Request) {
1616
return
1717
}
1818

19-
samples, err := wav.Samples(file)
19+
samples, err := audio.Samples(file)
2020
if err != nil {
2121
http.Error(w, err.Error(), http.StatusInternalServerError)
2222
return

cmd/wavelet/waveform.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"os"
1111
"strconv"
1212

13+
"github.com/soundcloud/wavelet/lib/audio"
1314
"github.com/soundcloud/wavelet/lib/sampler"
1415
"github.com/soundcloud/wavelet/lib/utils"
15-
"github.com/soundcloud/wavelet/lib/wav"
1616
)
1717

1818
var sampling = map[string]sampler.SamplerFunc{
@@ -59,7 +59,7 @@ func waveform(w http.ResponseWriter, req *http.Request) {
5959
return
6060
}
6161

62-
samples, err := wav.Samples(file)
62+
samples, err := audio.Samples(file)
6363
if err != nil {
6464
http.Error(w, err.Error(), http.StatusInternalServerError)
6565
return

lib/wav/wav.go renamed to lib/audio/wav.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
package wav
1+
package audio
22

33
import (
44
"io"
55

66
"github.com/go-audio/audio"
7-
_wav "github.com/go-audio/wav"
7+
"github.com/go-audio/wav"
88
"github.com/pkg/errors"
99
)
1010

1111
// Samples WAV samples and returns, if successful, a slice containing all
1212
// the audio samples.
1313
func Samples(r io.ReadSeeker) (samples []int, err error) {
14-
d := _wav.NewDecoder(r)
14+
d := wav.NewDecoder(r)
1515
if !d.IsValidFile() {
1616
return nil, errors.Errorf("invalid file")
1717
}

lib/wav/wav_test.go renamed to lib/audio/wav_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wav
1+
package audio
22

33
import (
44
"math"

0 commit comments

Comments
 (0)