[alsa-devel] snd_pcm_runtime.buffer_size question
tiwai at suse.de
Wed Feb 11 18:27:03 CET 2009
At Wed, 11 Feb 2009 18:21:11 +0100,
Tim Blechmann wrote:
> hi all,
> i am currently fighting with the snd_pcm_runtime.buffer_size. how is the
> value defined?
> i would expect:
> channels * periods * period_size * sample_bits/8
> (in my case 64*5*128*3)
> however in the code, i am working on, it seems to be:
> periods * period_size
> (in my case 5*128)
> am i missing something obvious?
There is a difference between buffer_size and buffer_bytes.
The former is in "frame" unit while the latter is in bytes.
In ALSA, 1 frame corresponds to (channels*sample_bits/8) bytes.
More information about the Alsa-devel