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

Fix wav format pcm encoding detection error #1103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

loliball
Copy link

@loliball loliball commented Feb 18, 2024

Problem

I exported some long-duration audio files in wav format from Adobe Audition, but there was a harsh noise when played on exoplayer.

Root Cause

WavExtractor#readFormat ignores GUIDs declared in fmt blocks when making PCM format selections.
Only integer bit depths are considered when TYPE_WAVE_FORMAT_EXTENSIBLE (0xFFFE) is detected.

Solution

Parse WavFormat.extraData to get GUID to determine PCM data type, add missing ENCODING_PCM_FLOAT AUDIO_MLAW AUDIO_ALAW.

Links

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.

None yet

2 participants