add audio support, trying to manage MSD device
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"rkkvm/config"
|
||||
"sync"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -25,7 +26,7 @@ type ExtProcess struct {
|
||||
func Init(path string, args []string) *ExtProcess {
|
||||
return &ExtProcess{
|
||||
args: args,
|
||||
path: path,
|
||||
path: config.RootFS + path,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +42,7 @@ func (u *ExtProcess) Start() {
|
||||
u.stopChan = make(chan struct{})
|
||||
u.finished = make(chan struct{})
|
||||
|
||||
log.Debug("Starting external process...")
|
||||
log.Debugf("Starting external process: %s %v", u.path, u.args)
|
||||
u.cmd = exec.Command(u.path, u.args...)
|
||||
u.cmd.Stdout = os.Stdout
|
||||
u.cmd.Stderr = os.Stderr
|
||||
@@ -99,8 +100,6 @@ func (u *ExtProcess) Stop() {
|
||||
log.Errorf("Failed to close stdin: %v", err)
|
||||
}
|
||||
|
||||
log.Info("waiting for finish")
|
||||
|
||||
select {
|
||||
case <-u.finished:
|
||||
log.Info("stopped as expected")
|
||||
|
||||
Reference in New Issue
Block a user