Need 24 and 32 bit audio exports

• Mar 8, 2020 - 10:07
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Looks like exporting as WAV produces a 16-bit file, as does FLAC. This quality is fine for CDs, but a lot of times we import this into Audacity for further editing. (And also for film festivals, they require 24 bit audio files.) 16-bit just isn't high enough.

Need the capability of exporting as 24 or 32-bit audio.


Comments

Code is at mscore/exportaudio.cpp, lines 274-284:

      int format;
      if (name.endsWith(".wav"))
            format = SF_FORMAT_WAV | SF_FORMAT_PCM_16;
      else if (name.endsWith(".ogg"))
            format = SF_FORMAT_OGG | SF_FORMAT_VORBIS;
      else if (name.endsWith("flac"))
            format = SF_FORMAT_FLAC | SF_FORMAT_PCM_16;
      else {
            qDebug("unknown audio file type <%s>", qPrintable(name));
            return false;
            }

(shouldn't that rather be ".flac"?)
sndfile.h has these options:

   SF_FORMAT_PCM_S8        = 0x0001,     /* Signed 8 bit data */
    SF_FORMAT_PCM_16        = 0x0002,     /* Signed 16 bit data */
    SF_FORMAT_PCM_24        = 0x0003,     /* Signed 24 bit data */
    SF_FORMAT_PCM_32        = 0x0004,     /* Signed 32 bit data */
 
    SF_FORMAT_PCM_U8        = 0x0005,     /* Unsigned 8 bit data (WAV and RAW only) */

Guess we can (and should) ignore SF_FORMAT_PCM_S8 and SF_FORMAT_PCM_U8 here.

Severity S5 - Suggestion S3 - Major
Status PR created active

Wow, that was fast, thanks!

Funny - when you said it would create artifacts, I thought you meant audio artifacts...

I'm not able to test the artifact - in OS X 10.13.6, it's reporting that the file is corrupt. It's OK, I can just wait for a release! Thanks!

Fix version
3.5.0