Skip to content

Commit

Permalink
🔥 (stream): Remove wav encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 23, 2023
1 parent ddd0043 commit e257e7d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 77 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/Presets/Buttons/DebugButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<v-card-title class="text-h5">Debug</v-card-title>
<v-card-text>
<v-btn :href="preset.mixUrlAs('mp3')" target="_blank" class="mr-2">Mix MP3</v-btn>
<v-btn :href="preset.mixUrlAs('wav')" target="_blank" class="mr-2">Mix WAV</v-btn>
</v-card-text>
<v-card-actions>
<v-spacer />
Expand Down
8 changes: 1 addition & 7 deletions internal/encoder/filetype/filetype.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ import (
"github.com/faiface/beep"
"github.com/gabe565/relax-sounds/internal/encoder"
"github.com/gabe565/relax-sounds/internal/encoder/mp3"
"github.com/gabe565/relax-sounds/internal/encoder/wav"
)

//go:generate stringer -type FileType -linecomment

type FileType uint8

const (
Wav FileType = iota // wav
Mp3 // mp3
Mp3 FileType = iota // mp3
)

var ErrInvalidFileType = errors.New("invalid file type")
Expand All @@ -39,8 +37,6 @@ func (i *FileType) UnmarshalText(b []byte) error {

func (i FileType) ContentType() string {
switch i {
case Wav:
return "audio/wav"
case Mp3:
return "audio/mp3"
}
Expand All @@ -49,8 +45,6 @@ func (i FileType) ContentType() string {

func (i FileType) NewEncoder(w io.Writer, format beep.Format) (encoder.Encoder, error) {
switch i {
case Wav:
return wav.NewEncoder(w, format)
case Mp3:
return mp3.NewEncoder(w, format)
}
Expand Down
7 changes: 3 additions & 4 deletions internal/encoder/filetype/filetype_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 0 additions & 65 deletions internal/encoder/wav/wav.go

This file was deleted.

0 comments on commit e257e7d

Please sign in to comment.