From ba08c58af40b0d2a87bbc0eed2ce95bedba4ef47 Mon Sep 17 00:00:00 2001 From: Trek H Date: Thu, 13 Aug 2020 15:42:28 +0930 Subject: [PATCH] alsa: added comment for exported function DataSize --- device/alsa/alsa.go | 2 ++ 1 file changed, 2 insertions(+) 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) }