10 Commits

Author SHA1 Message Date
Chris Robinson
95631aa358 Make the Compressor more class-like 2018-12-24 09:17:00 -08:00
Chris Robinson
7dc553350b Clean up most of the compressor loops 2018-12-20 11:46:57 -08:00
Chris Robinson
ba8c865513 Add and use a macro to define placement-new-only allocators
This is for structs that utilize over-allocation, either flexible array
members, or which store optional additional objects in the same allocation
block.
2018-11-22 07:06:42 -08:00
Chris Robinson
cc3e2a838f Use a unique_ptr for the Compressor 2018-11-21 16:46:52 -08:00
Chris Robinson
3021a426c0 Convert ALc.c to C++ 2018-11-14 04:15:44 -08:00
Chris Robinson
903d878460 Replace restrict with RESTRICT 2018-10-29 11:32:50 -07:00
Chris Robinson
1860b2ec8a Make the Compressor struct opaque 2018-09-30 12:08:01 -07:00
Chris Robinson
32494e72a5 Don't use a ringbuffer design for the limiter's side chain
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.
2018-09-29 11:54:45 -07:00
Chris Robinson
c69338bc0d Update the output limiter/compressor
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.
2018-09-25 10:04:14 -07:00
Chris Robinson
9b9ec2c21a Move the compressor/limiter declarations to their own header 2018-01-11 06:50:53 -08:00