Re: [Alsa-user] buffer size and period size relationship?
Brought to you by:
perex
From: Clemens L. <cla...@go...> - 2011-08-25 07:15:49
|
Raymond Toy wrote: > I'm working on an application where I wanted to do double-buffering and > tried to set the buffer size to 4096 and the period size to 2048. However, > the actual period size used by ALSA is 1365. In fact, it seems that > whatever I choose for the buffer size, the period size used by ALSA is 1/3 > of the buffer size. Is this a limitation of the audio HW that I'm using? This is possible. There isn't any particular combination of buffer/ period parameters that is guaranteed to be supported with all hardware. If you want to have two periods, call snd_pcm_hw_params_set_periods before try to set the other parameters, but this might fail. > cat /proc/asound/cards says: > > 0 [Intel ]: HDA-Intel - HDA Intel > HDA Intel at 0xf8000000 irq 21 HDA is quite flexible, but it's possible that you're using plugins that introduce additional restrictions. What device name are you using in your program? What plugins are shown when you run "aplay -D devicename -v something.wav"? Regards, Clemens |