Checkpoint
This commit is contained in:
138 files changed
+1898
-57607
No files matched your search
+5
-2
@@ -7,12 +7,15 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.maze.io/go/bragi/util"
|
||||
"periph.io/x/conn/v3/physic"
|
||||
|
||||
"go.maze.io/harmon/hardware"
|
||||
)
|
||||
|
||||
// Player controls music playback.
|
||||
type Player interface {
|
||||
hardware.Driver
|
||||
|
||||
// Name returns the name of the source.
|
||||
Name() string
|
||||
|
||||
@@ -50,7 +53,7 @@ func ParseMPDAudioFormat(s string) (f AudioFormat, err error) {
|
||||
var i int
|
||||
if i = strings.IndexByte(s, ':'); i == -1 {
|
||||
return f, fmt.Errorf("player: malformed MPD audio format %q", s)
|
||||
} else if f.SampleRate, err = util.ParseFrequency(s[:i]); err != nil {
|
||||
} else if err = f.SampleRate.Set(s[:i]); err != nil {
|
||||
return
|
||||
}
|
||||
s = s[i+1:]
|
||||
|
||||
Reference in new issue
Block a user