Re: WavPack 5.8.x is released
Reply #9 – 2025-01-30 18:28:16
I'm definitely not happy about such big behavior change. It means WavPack can't be safely upgraded in foobar2000's Free Encoder Pack as it will ruin multi file encoding performance. The converter parameters also can't be hardcoded to use new --no-threads option as it will error out and prevent old wavpack from working entirely. Hi Case. Yeah, I understand your concerns. However, I think that it’s not as bad as you think it might be, and there are a few simple solutions. First, as @Porcus mentions, I created an official “winXP” version (both 32-bit and 64-bit) that has all the threading stuff removed (that’s the only difference, built in Autotools with –disable-threads). I did this because XP doesn’t have the condition variables I use, and of course I have to make the multithreading stuff optional in the build because of other old OSes. You guys could just use that. And to answer Porcus' question, I thought of checking the Windows version and it's probably possible, but the way it works now the executable won't even load because it tries to link to the condition variable handling code in the Windows DLL, even if it's not going to use them. Alternatively, you could also add “--threads=1” to the options. That would work in this version and in 5.7.0 . Obviously in 5.6.0 and before it would fail, but that’s probably becoming rare. And even if you had to have this run with threading (or someone uses the official threaded version) I don’t think the performance hit would be that great. I only use a max of 4 worker threads in the “auto detect mode” and I have found that the performance hit of running that on a 1-core CPU is very small. Here are the results on Linux comparing the use of the "--no-threads" option with forcing the process to a single core (which I imagine is close to the situation of not having any available cores):david@pop-os-hp15:~/Projects/WavPack$ time cli/wavpack -x3 goodnight.wav -o - > /dev/null WAVPACK Hybrid Lossless Audio Compressor linux-gnu Version 5.8.1 Copyright (c) 1998 - 2025 David Bryant. All Rights Reserved. packed goodnight.wav in 6.54 secs (lossless, 44.39%) real 0m6.558s user 0m19.873s sys 0m0.979s david@pop-os-hp15:~/Projects/WavPack$ time cli/wavpack -x3 --no-threads goodnight.wav -o - > /dev/null WAVPACK Hybrid Lossless Audio Compressor linux-gnu Version 5.8.1 Copyright (c) 1998 - 2025 David Bryant. All Rights Reserved. packed goodnight.wav in 17.25 secs (lossless, 44.39%) real 0m17.267s user 0m16.675s sys 0m0.584s david@pop-os-hp15:~/Projects/WavPack$ time taskset 0x1 cli/wavpack -x3 goodnight.wav -o - > /dev/null WAVPACK Hybrid Lossless Audio Compressor linux-gnu Version 5.8.1 Copyright (c) 1998 - 2025 David Bryant. All Rights Reserved. packed goodnight.wav in 17.92 secs (lossless, 44.39%) real 0m17.947s user 0m17.085s sys 0m0.853s Now, a caveat with that is that in modes below -x3 I do more work in the multithreaded case to compensate for the lack of previous frame context, and that would be wasted in a sense (although it sometimes improves compression). But again, we’re not talking about that much (maybe 50% max) and if the performance becomes a problem then the user could simply choose a faster mode. What do you think? edit: I should add that I have been running this with Foobar2000 without issue (even the previous version adding "--threads"). However, because it's either a VM on a laptop or a very old dual-core machine, I have no way to make repeatable performance measurements. edit: Another possibility, thanks to @Porcus , is simply renaming the executable you distribute to wavpack{--no-threads}.exe . But I think just using the WinXP version is cleaner.