xiph / xiph/flac

--force-aiff-c-sowt-format results in non-interoperable files unless the original sample size is 16 bits

Open
#901 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2.4k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

The 'sowt' data format was defined by the old Macintosh Sound Manager as follows:

k16BitLittleEndianFormat      = 'sowt',		/*16-bit little endian*/

and this is how it's interpreted when encountered in an AIFF-C by multiple parsers, including Apple's for macOS and iOS.

Via use of --force-aiff-c-sowt-format the flac tool can be used to write an AIFF-C file indicating the 'sowt' data format regardless of sample size, and this can result in in 24- or 32-bit LPCM being interpreted as 16-bit.

Interoperable carriage in AIFF-C of little-endian 24- and 32-bit LPCM has apparently never been well documented, but it's definitely not via use of 'sowt'. It's probably better for the flac tool to fail if directed via --force-aiff-c-sowt-format to write 24- or 32-bit LPCM.

(It's possible to gain interoperability with libsndfile by writing '42ni' instead of 'sowt' as the AIFF-C "compression type" for 24-bit little endian and '23ni' for 32-bit little-endian.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the flac tool's --force-aiff-c-sowt-format handling and reproduce AIFF-C output with 24- and 32-bit LPCM. Check how the option selects the compression type, then verify that those sample sizes are rejected while 16-bit output remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.