Thorsten Wilms wrote:
Hi!
I'm interested in losless compression of typical Jack audifiles
for exchange. That means float32 sample format.
Hmm, interesting.
Flac doesn't handle float, only pcm.
wavpack handles both.
So I was told that converting from (wav) float32 to pcm24 and back
should be losless, if the float file is normalized.
I would be **very** surprised if it was. For a normalised WAV file
the maximum value would be 1.0 which will correspond to a pcm24
value of 0x7ffffff. The float32 file could also contain a sample
with a value of 1/(2^25) which is smaller than the pcm24 value of
0x1. Hence, float32 -> pcm24 -> float32 is not lossless.
This would cut
down on file-size by itself and allow to use Flac.
I tested this using sndfile-convert and diff tells me there are
differences. The file sizes are identical.
diff did not report differences for a wav-unpacked file (staying
in float32).
The wavpack algorithm must do soemthing special with float32 data.
Maybe what you want to do is add wavpack to libsndfile :-).
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"If POSIX threads are a good thing, perhaps I don't want to know what
they're better than." -- Rob Pike