aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mastering.c
Commit message (Collapse)AuthorAgeFilesLines
* Workaround lack of roundf with early MSVCChris Robinson2018-11-021-0/+12
|
* Use HUGE_VALF instead of INFINITYChris Robinson2018-11-021-1/+2
| | | | Older MSVC lacks INFINITY, and we define a HUGE_VALF fallback when needed.
* Specify the correct array size for castingChris Robinson2018-11-021-2/+2
|
* Add back an inadvertently removed staticChris Robinson2018-10-021-1/+1
|
* Use < instead of != for some loop checksChris Robinson2018-10-011-2/+2
|
* Ensure BUFFERSIZE is a power of 2Chris Robinson2018-09-301-2/+4
|
* Make the Compressor struct opaqueChris Robinson2018-09-301-3/+66
|
* Fix some length rangesChris Robinson2018-09-291-2/+8
|
* Improve a couple loopsChris Robinson2018-09-291-7/+15
| | | | | | Avoid masking the index with each iteration, and instead do up to when the mask would apply. This allows for better optimizations, in particular fewer instructions and better chances for vectorization.
* Don't use a ringbuffer design for the limiter's side chainChris Robinson2018-09-291-31/+21
| | | | | | Rather than continuously wrapping when used, each update uses it from the front and copies the tail to the front at the end. This allows for more effficient accesses in loops.
* Add some assumes for the limiterChris Robinson2018-09-291-0/+17
|
* Simplify a lower-bound clampChris Robinson2018-09-281-2/+1
|
* Constify a couple more variablesChris Robinson2018-09-281-2/+2
|
* Include the limiter's lookAhead delay in the device latencyChris Robinson2018-09-251-3/+3
|
* Update the output limiter/compressorChris Robinson2018-09-251-132/+345
| | | | | | | | | | This provides better characteristics for an amplitude limiter. In particular, it utilizes the peak amplitude instead of the RMS, and the used parameters basically guarantee no output samples exceed the given threshold... almost, due to floating-point errors as the threshold is converted from dB to log-e for the envelope, then is negated and converted to linear amplitude to apply to the signal. It's quite possible for some rounding errors to creep in and not perfectly saturate the result.
* Avoid potentially calling log10f(0)Chris Robinson2018-04-291-1/+1
|
* Move the compressor/limiter declarations to their own headerChris Robinson2018-01-111-27/+4
|
* Remove the fastf2u conversion functionChris Robinson2017-06-271-1/+1
|
* Add a new compressor/limiterChris Robinson2017-05-271-0/+255
This is just for the output limiter right now, but in the future can be used for the compressor EFX effect. The parameters are also hardcoded, but can be made configurable after 1.18.