mirror of https://bitbucket.org/ausocean/av.git
treatment: create and check audiofilepath variable
This commit is contained in:
parent
51c489946a
commit
8b4e28a944
|
@ -83,6 +83,7 @@ const (
|
||||||
// Variable map to send to netreceiver/vidgrind.
|
// Variable map to send to netreceiver/vidgrind.
|
||||||
var varMap = map[string]string{
|
var varMap = map[string]string{
|
||||||
"mode": "enum:Paused,Play,Check",
|
"mode": "enum:Paused,Play,Check",
|
||||||
|
"audioFilePath": "string",
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
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.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")
|
l.Log(logger.Debug, "checking mode")
|
||||||
switch ns.Mode() {
|
switch ns.Mode() {
|
||||||
case modePaused:
|
case modePaused:
|
||||||
|
|
Loading…
Reference in New Issue