Merge branch 'master' into writerate

This commit is contained in:
Trek H 2020-08-14 13:01:41 +09:30
commit d13d02e21a
1 changed files with 4 additions and 8 deletions

View File

@ -456,17 +456,13 @@ func (r *Revid) Start() error {
} }
r.cfg.Logger.Log(logger.Info, "revid reset") r.cfg.Logger.Log(logger.Info, "revid reset")
// Calculate delay between frames based on FileFPS for Video or // Calculate delay between frames based on FileFPS for video or
// between recording periods for audio. // between recording periods for audio.
d := time.Duration(0) d := time.Duration(0)
if r.cfg.Input == config.InputAudio { if r.cfg.Input == config.InputAudio {
if r.cfg.RecPeriod != 0 { d = time.Duration(r.cfg.RecPeriod * float64(time.Second))
d = time.Duration(r.cfg.RecPeriod * float64(time.Second)) } else if r.cfg.FileFPS != 0 {
} d = time.Duration(1000/r.cfg.FileFPS) * time.Millisecond
} else {
if r.cfg.FileFPS != 0 {
d = time.Duration(1000/r.cfg.FileFPS) * time.Millisecond
}
} }
r.cfg.Logger.Log(logger.Debug, "starting input processing routine") r.cfg.Logger.Log(logger.Debug, "starting input processing routine")