revid: updated audio config parameters throughout audio-input.go to use revid.Config

This commit is contained in:
Trek H 2019-04-24 11:46:00 +09:30
parent c51e0ec168
commit 889d440259
2 changed files with 5 additions and 5 deletions

View File

@ -76,10 +76,10 @@ type Config struct {
AutoWhiteBalance string AutoWhiteBalance string
// Audio // Audio
SampleRate uint // Frame rate in Hz. SampleRate int // Samples a second (Hz).
Period int // How many seconds to record at a time. Period int // How many seconds to record at a time.
Channels int // Number of audio channels, 1 for mono, 2 for stereo. Channels int // Number of audio channels, 1 for mono, 2 for stereo.
BitDepth int // Sample bit depth, 16-bit by default. BitDepth int // Sample bit depth.
} }
// Possible modes for raspivid --exposure parameter. // Possible modes for raspivid --exposure parameter.

View File

@ -676,7 +676,7 @@ func (r *Revid) setupInputForFile() error {
// startAudioInput is used to start capturing audio from an audio device and processing it. // startAudioInput is used to start capturing audio from an audio device and processing it.
func (r *Revid) startAudioInput() error { func (r *Revid) startAudioInput() error {
ai := NewAudioInput() ai := NewAudioInput(&r.config)
go r.processFrom(ai, time.Second/time.Duration(r.config.Rate)) go r.processFrom(ai, time.Second/time.Duration(r.config.Rate))
return nil return nil