How to achieve bit perfect audio?

MOC version: 

How can I archive bit perfect audio with moc? I have muisc files that are 32 bits and 192kHz and I want to play them with maximum quality? How can I do that?

I've been pondering what might be behind this question for the last few days. Apparantly, you have some specific use case in mind which it might be helpful to share with us.

There are several elements in the MOC audio path. First is the codec which must support 32-bit samples; my guess is that you already have that. Secondly, the decoder (and supporting libraries) MOC is using must deliver that 32-bit sample. Which decoder are you using? Any 32-bit samples should then pass through MOC intact. The exception to that is if your sound subsystem requires some other bit-depth then MOC will need to convert it. What the sound subsystem requires may be dictated by the audio hardware capabilities.

I know that doesn't really answer your question, but without more specific information it's difficult to do better. Do you have any example where you believe MOC is changing the bit-depth when you think it should not?

It's worth noting that only ffmpeg and wavpack decoders might possibly support lossless 32-bit samples. Other decoders do not - most notably neither flac nor wav would do.

Second thing to check is the option "Allow24bitOutput = yes" is set in MOC config file. It controls in reality 32bit output, not 24bit output. MOC doesn't support real 24bit output.

Third thing would be to make sure that ALSA (or some other sound subsystem) doesn't do resampling with things like "dmix" regardless of hardware capabilities.