Bugzilla – Bug 2606
Imported tracks should not have less bit depth than Quality Preference
Last modified: 2021-01-02 09:24:28 UTC
Even when "Preferences > Quality > Default Sample Format" is set to 32-bit float (default), some file imports will create tracks with less than 32-bit float samples. Example: Import an MP3 with the FFmpeg importer. Creates a 16-bit track. It is however OK for an imported track to have a greater bit-depth than the Prefs default. For example, importing a 24-bit WAV file when the default quality is 16-bit, the file format should override the default and create a 24-bit or 32-bit float track (conversion from 24-bit to 32-bit float is lossless).
Steve, please tell me whether you agree with my additions to steps to reproduce.
(In reply to Paul L from comment #1) I don't see the problem with the MP3 importer on Linux. I only see the problem with MP3 files if I force Audacity to use the FFmpeg importer (libav) rather than libmad. The easiest way to coerce the use of FFmpeg is to select the "FFmpeg compatible files" filter in the Import dialog.
I recall that OGG was fixed a while back. It seems that (on Linux) the problem only occurs when using the FFmpeg importer. I don't know if that's the same on all platforms.
(In reply to Steve Daulton from comment #3) Closer study of the code shows you are right about OGG, also FLAC But FFmpeg is wrong, and also MP3 always uses the Quality preference format -- which is wrong, not consistent with PCM does, overriding the preference and using a wide enough format to be non-lossy. MP3 needs to import as float always, because libmad uses a 32 bit fixed-point format: wider than 24 bits.
Fixed at f4f8194dc67deecf24dd30e3caa605a5eb5df725 Incidental changes to OGG and FLAC -- they now never make 24 bit tracks even if that is the preference. This makes all importers consistent with what PCM and Raw import do.
(In reply to Paul L from comment #4) > MP3 needs to import as float always, because libmad uses a 32 bit > fixed-point format: wider than 24 bits. Although most MP3 files are representing 16-bit data, I agree that this is technically correct.
Testing on W10 with Audacity 3.0.0 a675b59 This now works properly, importing the MP3 as 32-bit I also tested against 2.4.2 and earlier versions of 3.0.0 alpha and it failed on those, importing the MP3 as 16-bit
Tested on macOS 11.0.1 Big Sur with Audacity 3.0.0 a675b59 The same good results as on W10
I find the checkbox at the top of the Extended Import Prefs confusing a) it's checked "on" by default b) you have to turn it "off" in order for the Extended Import rules to take precedence over normal import. The wording is far from clear - I had to make a very careful reading of the Manual page to grasp this as I was testing
Now tested on all platforms. Resolved.