Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSADPCM audio format decoding support #19125

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

teinarss
Copy link
Contributor

@teinarss teinarss commented Feb 3, 2021

Resurrection of #18552
Supersedes and closes #18552.

@teinarss
Copy link
Contributor Author

teinarss commented Feb 4, 2021

Added a testcase, Need to extract track from the meg-package with https://modtools.petrolution.net/tools/MegEditor and update the filename.

@pchote
Copy link
Member

pchote commented Feb 14, 2021

The new audio player in #19143 should make testing this much easier: add the meg package loader and mount the package in mod.yaml, then select it in the asset browser.

@pchote
Copy link
Member

pchote commented Feb 14, 2021

Works as expected and everything else lgtm, so 👍 once the points above are sorted.

: nibble;

s2 = s1;
s1 = (short)(twosCompliment * idelta + predict).Clamp(-32768, 32768);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, sorry, this actually needs to be .Clamp(-32768, 32767)!

Clamping to +32768 introduces noticeable audio glitches in certain files (e.g. EN-US\TDR_SFX_UNT_YESSIR1.V03_EN-US.WAV).

LGTM after this final fix. Maybe also a good time to remove the testcase?

If anyone else wants to test this i recommend rebasing on top of #19143, adding MegV3 to mod.yaml's PackageFormats list, and mounting MUSIC.MEG or SFX2D_EN-US.MEG in the packages list.

@teinarss
Copy link
Contributor Author

Updated.

@reaperrr reaperrr merged commit 536c130 into OpenRA:bleed Feb 19, 2021
@teinarss teinarss deleted the MSADPCM_audio_ branch April 15, 2021 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants