|
@@ -18,6 +18,7 @@ import (
|
|
|
"syscall"
|
|
|
"time"
|
|
|
|
|
|
+ "github.com/faiface/beep/speaker"
|
|
|
"imuslab.com/hds/audio/mod/mdns"
|
|
|
)
|
|
|
|
|
@@ -33,6 +34,9 @@ func SetupCloseHandler() {
|
|
|
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
|
|
go func() {
|
|
|
<-c
|
|
|
+ //Stop the speaker
|
|
|
+ speaker.Clear()
|
|
|
+ speaker.Close()
|
|
|
//Clear up the tmp folder
|
|
|
os.RemoveAll("./tmp")
|
|
|
|