Skip to content

(feature request) - automatic gain limiter #480

@softhack007

Description

@softhack007

How about adding something like an "automatic gain limiter" to the AudioOutput class?

I imagine it the following way:

  • user does output->setGain(2.5) - or something which is a bit too high
  • user does output->enableGainLimiter(true)
  • during playback, the output class initially uses the gain set by users parameter.
  • whenever the output sample (after Amplify) would be above/below a certain threshold - say 96% of MAX - the gain value is slightly reduced and the output sample is re-computed (i.e. repeat Amplify step).

This would be an easy way to reduce gain and avoid sound saturation. Its not a real "AGC", but a lightweight version that avoids some complications because it only reduces amplification, but never increases it.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions