It has long been known that due to a bug in Audacity, when exporting a 16 bit track to a 16 bit uncompressed file format, if "dither" is enabled in Preferences, dither will be applied to the exported data.
bgravato recently mentioned that he tried something similar with 24 bit integer audio and dither was not applied.
I've started this topic so that we can investigate exactly when dither is applied and when not to clarify the actual situation regarding bug 22.
Test 1
New Audacity Project - dither enabled in Preferences - default Quality 32 bit float. (Copy or read directly does not appear to affect the outcome.)
Open a 16 bit wav file.
Export as 16 bit wav.
The two files are different.
Test 2
As for Test 1, but using 24 bit instead of 16 bit.
The two files are identical.
How to test for identical audio data:
With "Preferences > Quality" set for 32 bit float;
Import both files.
Invert one of the tracks.
Select both tracks and "Mix and Render".
Select the "silent" track and call up the "Amplify" effect. If the track has absolute silence, the "New peak amplitude" will show as "-Infinity".
Question: Is Audacity "doing the right thing" with 24 bit files by not-dithering, or is something else occurring?
I suspect that Audacity is not doing the right thing and bgravato has discovered another bug.... more tests to follow.