diff --git a/device/alsa/alsa.go b/device/alsa/alsa.go index eadf7bd3..72b643a1 100644 --- a/device/alsa/alsa.go +++ b/device/alsa/alsa.go @@ -466,6 +466,8 @@ func (d *ALSA) formatBuffer() pcm.Buffer { return formatted } +// DataSize returns the size in bytes of the data ALSA device d will +// output in the duration of a single recording period. func (d *ALSA) DataSize() int { return pcm.DataSize(d.SampleRate, d.Channels, d.BitDepth, d.RecPeriod, d.Codec) }