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
// 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.

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.
func (r *Revid) startAudioInput() error {
ai := NewAudioInput()
ai := NewAudioInput(&r.config)
go r.processFrom(ai, time.Second/time.Duration(r.config.Rate))
return nil