mirror of https://bitbucket.org/ausocean/av.git
treatment: create and check audiofilepath variable
This commit is contained in:
parent
51c489946a
commit
8b4e28a944
|
@ -82,7 +82,8 @@ const (
|
|||
|
||||
// Variable map to send to netreceiver/vidgrind.
|
||||
var varMap = map[string]string{
|
||||
"mode": "enum:Paused,Play,Check",
|
||||
"mode": "enum:Paused,Play,Check",
|
||||
"audioFilePath": "string",
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -183,6 +184,13 @@ func run(rv *revid.Revid, ns *netsender.Sender, file *string, l *logger.Logger,
|
|||
}
|
||||
l.Log(logger.Info, "revid successfully reconfigured")
|
||||
|
||||
l.Log(logger.Debug, "checking audio file path")
|
||||
f := vars["audioFilePath"]
|
||||
if f != "" && *file != f {
|
||||
file = &f
|
||||
l.Log(logger.Info, "updated audio file path", "audioFilePath", f)
|
||||
}
|
||||
|
||||
l.Log(logger.Debug, "checking mode")
|
||||
switch ns.Mode() {
|
||||
case modePaused:
|
||||
|
|
Loading…
Reference in New Issue