On Wed, Jun 20, 2018 at 11:31:37PM +0200, Denis Buga wrote:
> sorry for bad english

no problem

> if simplify, seems like we have three pairs of concepts, while in audio path 
> from file to card
> file (Hz/bit), sndiod (Hz/bit), card (Hz/bit)
> first and third is more or less i understand
> by second i mean sndiod's "dsp" 
> i understand, that, when i set up "sndiod_flags" with frequency "N" and 
> "aucat" file with same "N"
> - i can think about it as, simplifying, "passthrough by frequency"

yes, true

> seems like, the same thing i can think about "bits" in "sndiod_flags"
> my question is about "ADATA_BITS" in "dsp.h":

sndiod always uses ADATA_BITS internally, no matter the file format,
the sound-card format or the sndiod_flags. By default, ADATA_BITS=16,
so it uses 16-bit, signed, native byte order (aka "s16").

> to get "bit-perfect" audio, do i need to set this value in all the way with
> file, sndiod_flags
> if we say that we need "perfect line", is it nessesary to have
> ADATA_BITS same as "-e ...N... " in sndiod_flags
> ?

With ADATA_BITS=16, the only way to get bit-perfect data is to use
files with the "s16" format on a sound-card supporting "s16". The
volume must be set to the maximum (-v 127 -w off), so that sndiod wont
modify the samples, and only one program must be playing.

Note that if the file is 8-bit or 16-bit non-native byte order, the
resulting data won't have the same binary representation, but I'd
qualify the resulting sound as bit-perfect. This is because the
original bits representation can be recovered back from the sndiod
output.

As long as sndiod and the sound-card have better precision than the
file, the sound restitution will be perfect (assuming there's no
sample frequency conversion, volume changes, etc).

Reply via email to