[pulseaudio-discuss] How does automatic output resampling in Pulseaudio work?
Tanu Kaskinen
tanuk at iki.fi
Mon Feb 18 12:37:09 PST 2008
On Mon, Feb 18, 2008 at 11:56:05AM -0800, Erich Boleyn wrote:
> When Pulseaudio converts from one format to another at the sound output
> (say for an ostensibly 16-bit/48-khz DAC) *and* performs the automatic
> output resampling (due to the normal output hardware clock imperfection
> issues), which one more accurately represents the real chain of events:
>
> A) 24-bit/96-khz PCM --(resampled)--> 16-bit/48-khz
> --(resampled)--> 16-bit/near-48-khz-real-freq
>
> B) 24-bit/96-khz PCM --(resampled)--> 16-bit/near-48-khz-real-freq
>
> I.e. is it resampled once to get to the "output format" and again at
> the final hardware matching stage, or is it resampled once directly to
> the hardware matching frequency?
If I understood you correctly, then the answer is that there
is no "final hardware matching stage". In your example the
sound card reports that it uses sampling rate of 48000 Hz,
and pulseaudio trusts that it's correct information. If it's
not, then the sound is played slightly too fast or too
slowly. The small deviation is taken into account only when
there are multiple clocks, for example two sound cards, and
even then the correction is not based on actual time, but
just the observed difference in the clocks.
So resampling is always done only once (afaik).
--
Tanu Kaskinen
More information about the pulseaudio-discuss
mailing list