mirror of https://github.com/mpv-player/mpv
2872e23aea
Currently, the softvol gain control attempts to clip floating point ao formats within -1 and +1. However, this is "optimized out" at unity gain, where no clipping is applied. This results in inconsistent behavior when the source audio is already out of -1 and +1 range, where a gain of 0.99 results in clipping, but not at exactly 1. Since a big advantage of floating point audio data is that they do not lose information through out-of-range data because the ao sink can apply suitable negative gain to prevent clipping before converting them to integer formats, clipping should not be performed on these data. Fix this by removing the existing clipping behavior. It now results in a simple multiplication, which faciliates compiler auto-vectorization of this operation over audio data. |
||
---|---|---|
.. | ||
ao.c | ||
ao.h | ||
ao_alsa.c | ||
ao_audiotrack.c | ||
ao_audiounit.m | ||
ao_coreaudio.c | ||
ao_coreaudio_chmap.c | ||
ao_coreaudio_chmap.h | ||
ao_coreaudio_exclusive.c | ||
ao_coreaudio_properties.c | ||
ao_coreaudio_properties.h | ||
ao_coreaudio_utils.c | ||
ao_coreaudio_utils.h | ||
ao_jack.c | ||
ao_lavc.c | ||
ao_null.c | ||
ao_openal.c | ||
ao_opensles.c | ||
ao_oss.c | ||
ao_pcm.c | ||
ao_pipewire.c | ||
ao_pulse.c | ||
ao_sdl.c | ||
ao_sndio.c | ||
ao_wasapi.c | ||
ao_wasapi.h | ||
ao_wasapi_changenotify.c | ||
ao_wasapi_utils.c | ||
buffer.c | ||
internal.h |