audio: use new improved default namer to avoid API conflicts

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-02-02 15:50:49 +01:00
parent 169af71bb0
commit 67c7246f09
2 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,8 @@ import (
"os"
"os/exec"
"path"
"gobot.io/x/gobot"
)
// Adaptor is gobot Adaptor connection to audio playback
@ -17,7 +19,7 @@ type Adaptor struct {
// NewAdaptor returns a new audio Adaptor
//
func NewAdaptor() *Adaptor {
return &Adaptor{name: "Audio"}
return &Adaptor{name: gobot.DefaultName("Audio")}
}
// Name returns the Adaptor Name

View File

@ -25,7 +25,7 @@ type Driver struct {
//
func NewDriver(a *Adaptor, filename string) *Driver {
return &Driver{
name: "Audio",
name: gobot.DefaultName("Audio"),
connection: a,
interval: 500 * time.Millisecond,
filename: filename,