From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: how many processed frames? + various thoughts Date: Fri, 01 Oct 2010 09:03:37 +0200 Message-ID: <4CA587C9.6040506@ladisch.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by alsa0.perex.cz (Postfix) with ESMTP id 20B681039C9 for ; Fri, 1 Oct 2010 09:02:47 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: John John Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org John John wrote: > Knowing the sample rate and the processed samples, I'm able to > calculate the clock (what do you think about this approach?). The sound card's clock will not be exactly synchronous with the computer's clock. > is there a good function into alsa API which returns the number of > processed frames? snd_pcm_writei() does return the number of processed frames. snd_pcm_delay() returns the offset to the position of the sample that is currently being played. Regards, Clemens