From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Lowest latency: JACK, or ALSA directly? Date: Fri, 12 Nov 2004 18:01:08 +0100 Message-ID: References: <20041111144152.GA12443@stud.ntnu.no> <87mzxozahr.fsf@sulphur.joq.us> <20041112090416.GA3167@stud.ntnu.no> <87oei3xbly.fsf@sulphur.joq.us> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <87oei3xbly.fsf@sulphur.joq.us> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Jack O'Quin Cc: =?ISO-8859-1?Q?Asbj=F8rn_S=E6b=F8?= , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At 12 Nov 2004 10:42:33 -0600, Jack O'Quin wrote: > > > (As an aside, there is another thing that is not clear to me. A set of > > samples from all channels is called a frame, and a set of frames is a > > period. But the total buffer is made up from a set of periods again. > > How does this buffer function? Does one get data from the sound card > > each and every period (which I believe), or only when the buffer is > > full? Do you get the data from a period when it is full, or do you > > have to wait some periods?) > > The sound card generates an interrupt at the end of each period. This > determines the input latency. The hardware buffer holds multiple > periods (you need at least two). Its size determines the maximum > output latency. With JACK, there's not much reason to use more than > two or three periods, unless you're running without realtime > privileges. Regarding JACK's latency: can JACK handle more than two periods with the minimal latency? That is, keeping only two periods active (the current playing and the next periods), you can achieve the same latency even if the buffer consists of more than two periods. I'm asking this because some boards (e.g. RME32/96) have the fixed buffer size, and can't take the configuration as two periods per buffer. IIRC, JACK fills all the buffer at the first sequence, and this results in the higher latency than necessary. Correct me if I'm wrong. Takashi ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click