From 889d4402596ba4acd2c998d9d4ed764cebadbb13 Mon Sep 17 00:00:00 2001 From: Trek H Date: Wed, 24 Apr 2019 11:46:00 +0930 Subject: [PATCH] revid: updated audio config parameters throughout audio-input.go to use revid.Config --- revid/config.go | 8 ++++---- revid/revid.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/revid/config.go b/revid/config.go index 59207107..63f6d017 100644 --- a/revid/config.go +++ b/revid/config.go @@ -76,10 +76,10 @@ type Config struct { AutoWhiteBalance string // Audio - SampleRate uint // Frame rate in Hz. - Period int // How many seconds to record at a time. - Channels int // Number of audio channels, 1 for mono, 2 for stereo. - BitDepth int // Sample bit depth, 16-bit by default. + SampleRate int // Samples a second (Hz). + Period int // How many seconds to record at a time. + Channels int // Number of audio channels, 1 for mono, 2 for stereo. + BitDepth int // Sample bit depth. } // Possible modes for raspivid --exposure parameter. diff --git a/revid/revid.go b/revid/revid.go index 47c2c4f2..cda7f127 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -676,7 +676,7 @@ func (r *Revid) setupInputForFile() error { // startAudioInput is used to start capturing audio from an audio device and processing it. func (r *Revid) startAudioInput() error { - ai := NewAudioInput() + ai := NewAudioInput(&r.config) go r.processFrom(ai, time.Second/time.Duration(r.config.Rate)) return nil