Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 0 additions & 133 deletions audio/audio.go

This file was deleted.

69 changes: 0 additions & 69 deletions audio/audio_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions audio/doc.go

This file was deleted.

18 changes: 10 additions & 8 deletions audio/pcm/driver.go → audio/driver.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pcm
package audio

// A Driver defines the underlying interface that should be used for initializing PCM audio writers
// by this package.
Expand All @@ -10,14 +10,16 @@ const (
DriverDefault Driver = iota
DriverPulse
DriverDirectSound
DriverALSA
)

var driverNames = map[Driver]string{
DriverPulse: "pulseaudio",
DriverDirectSound: "directsound",
DriverDefault: "default",
DriverALSA: "alsa",
}

func (d Driver) String() string {
switch d {
case DriverPulse:
return "pulseaudio"
case DriverDirectSound:
return "directsound"
}
return ""
return driverNames[d]
}
17 changes: 17 additions & 0 deletions audio/driver_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package audio

import "testing"

func TestDriver_String(t *testing.T) {
drivers := []Driver{
DriverDefault,
DriverDirectSound,
DriverPulse,
DriverALSA,
}
for _, d := range drivers {
if d.String() == "" {
t.Errorf("driver %d had no defined string", d)
}
}
}
67 changes: 0 additions & 67 deletions audio/ears.go

This file was deleted.

15 changes: 0 additions & 15 deletions audio/error_test.go

This file was deleted.

Loading