Skip to content

feat: add Dolby TrueHD SampleEntry and ConfigurationBox - #568

Open
jamrial wants to merge 1 commit into
gpac:mainfrom
jamrial:mlpa
Open

feat: add Dolby TrueHD SampleEntry and ConfigurationBox#568
jamrial wants to merge 1 commit into
gpac:mainfrom
jamrial:mlpa

Conversation

@jamrial

@jamrial jamrial commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

As the PR subject says, this add supports for Dolby TrueHD specific sample entry and configuration box.

The only issue is that samplerate in MLPSampleEntry, despite being an extension of AudioSampleEntry, is defined as a 32bit unsigned value instead of a 16.16 fixed point value as in the main spec. The idea was to support sample rates higher than 48Khz, but clearly people at Dolby did not realize that the srat box exists for this same purpose, and came up with this hack.

I don't know how to make the aforementioned change.

this.samplerate = stream.readUint32() / (1 << 16);

This should somehow check that the class extending AudioSampleEntry is MLPSampleEntry and then parse samplerate in a different way, probably in a similar fashion to the existing isQT check. Do you know how this could be done?

And then

stream.writeUint32(this.samplerate << 16);

Should do the same for writing.

@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bc492f3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Signed-off-by: James Almer <jamrial@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant