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

[rbp] Apply volume control at audio_mixer when possible #2081

Merged
merged 1 commit into from Jan 16, 2013

Conversation

popcornmix
Copy link
Member

On Pi, the analogue audio has ~10 bits so it is important to make use of the full dynamic range.
Currently when downmixing from, say, 5.1 to stereo the "boost volume on downmix" is applied to mixer component. The volume is applied after this.
If you don't boost volume on downmix you reduce volume level, and so lose dynamic range.
If you do boost volume on downmix you risk clipping and distorting audio. The volume control happens too late to avoid this.

This patch applies the volume control to the downmix coefficient which allows "boost" to be enabled, and the volume to be adjusted to maximise range without clipping.

See huceke/omxplayer#58 for original discussion for a similar patch to omxplayer. Thanks to torarin for original patch.

@rbej
Copy link

rbej commented Jan 16, 2013

It works. Clipping and distorting audio is gone.

@davilla
Copy link
Contributor

davilla commented Jan 16, 2013

@huceke ?

huceke added a commit that referenced this pull request Jan 16, 2013
[rbp] Apply volume control at audio_mixer when possible
@huceke huceke merged commit 99a536c into xbmc:master Jan 16, 2013
@popcornmix popcornmix deleted the mixer_volume branch January 16, 2013 16:35
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

4 participants