[alsa-devel] snd_pcm_runtime.buffer_size question
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?
thanks, tim
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.
Takashi
participants (2)
-
Takashi Iwai
-
Tim Blechmann