All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: alsa-devel@alsa-project.org
Subject: Re: pcm_rate API  question
Date: Mon, 30 Sep 2013 16:16:58 +0200	[thread overview]
Message-ID: <524987DA.4050800@ladisch.de> (raw)
In-Reply-To: <1380539713.33591.YahooMailNeo@web171401.mail.ir2.yahoo.com>

Rob Sykes wrote:
>>> Typically there is some buffering/delay within a resampler -- how
>>> does the pcm_rate API allow for this?
>>
>> The API itself does not allow for this.  Your code must generate
>> dst_frames samples.
>>
>> At startup, prefix the output with zero samples.
>
> this situation can apparently occur at any time: "after that first
> call all subsequent calls will probably get you about 2000 samples out
> for every 1000 samples you put in" — only "probably", not "always";
> occurring after the start, this will likely cause audible distortion.

You must know your resampling algorithm.  If it introduces delays, you
need to buffer more samples.


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2013-09-30 14:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 11:59 pcm_rate API question Rob Sykes
2013-09-27 12:38 ` Clemens Ladisch
     [not found]   ` <1380295697.44147.YahooMailNeo@web171405.mail.ir2.yahoo.com>
2013-09-28  9:58     ` Rob Sykes
2013-09-30  8:59       ` Clemens Ladisch
2013-09-30 11:15         ` Rob Sykes
2013-09-30 14:16           ` Clemens Ladisch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524987DA.4050800@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.