diff --git a/platforms/audio/audio_adaptor.go b/platforms/audio/audio_adaptor.go index f5f7f95d..48567bd4 100644 --- a/platforms/audio/audio_adaptor.go +++ b/platforms/audio/audio_adaptor.go @@ -47,7 +47,7 @@ func (a *AudioAdaptor) Sound(fileName string) []error { // command to play a MP3 file cmd := exec.Command("mpg123", fileName) - err = cmd.Run() + err = cmd.Start() if err != nil { log.Println(err) diff --git a/platforms/audio/audio_adaptor_test.go b/platforms/audio/audio_adaptor_test.go index d4fb3714..3961f64d 100644 --- a/platforms/audio/audio_adaptor_test.go +++ b/platforms/audio/audio_adaptor_test.go @@ -2,7 +2,6 @@ package audio import ( - "os/exec" "testing" "github.com/hybridgroup/gobot/gobottest" @@ -15,14 +14,5 @@ func TestAudioAdaptor(t *testing.T) { gobottest.Assert(t, len(a.Connect()), 0) - _, err := exec.LookPath("mpg123") - numErrsForTest := 0 - if err != nil { - numErrsForTest = 1 - } - gobottest.Assert(t, len(a.Sound("../resources/foo.wav")), numErrsForTest) - - gobottest.Assert(t, len(a.Connect()), 0) - gobottest.Assert(t, len(a.Finalize()), 0) } diff --git a/platforms/audio/audio_driver_test.go b/platforms/audio/audio_driver_test.go index f188c38e..a61608f7 100644 --- a/platforms/audio/audio_driver_test.go +++ b/platforms/audio/audio_driver_test.go @@ -3,7 +3,6 @@ package audio import ( - "os/exec" "testing" "github.com/hybridgroup/gobot/gobottest" @@ -18,11 +17,4 @@ func TestAudioDriver(t *testing.T) { gobottest.Assert(t, len(d.Start()), 0) gobottest.Assert(t, len(d.Halt()), 0) - - _, err := exec.LookPath("mpg123") - numErrsForTest := 0 - if err != nil { - numErrsForTest = 1 - } - gobottest.Assert(t, len(d.Sound("../resources/foo.mp3")), numErrsForTest) }