5183 Commits

Author SHA1 Message Date
Chris Robinson
4aa029183b Apply the reverb's T60 filter in groups of samples
The late reverb line lengths are long enough to ensure a single process loop
won't rely on reading samples it wrote in the same call. So we can safely read
in all samples we need from the feedback buffer up front, then more efficiently
filter them.
2018-08-05 00:45:13 -07:00
Chris Robinson
3f165040e2 Mix reverb samples right after generating them
Instead of generating both the early and late reverb samples first, then mixing
them both to output, this now generates and mixes the early reflections then
generates and mixes the late reverb. There's no reason to hold both at the same
time so this reduces the amount of temporary storage needed.
2018-08-04 22:52:36 -07:00
Chris Robinson
754a32fa16 Scale the reverb decay weights to cover up to 20khz
Otherwise, using the device's maximum frequency will cause the weighting
factors to shift for different sample rates, irrespective of the content being
processed. 20khz is the maximum allowed reference frequency, and also acts as
the upper limit of human hearing.
2018-08-03 20:04:08 -07:00
Chris Robinson
57b860d8ca Trace the NFC reference distance when set 2018-08-03 00:07:08 -07:00
Chris Robinson
0c67429a38 Apply late reverb density gain adjustment on output
Because density/late line length changes start affecting late reverb output
right away, with samples that are still going through feedback decay and not
just new input samples, it makes more sense to correct for it on output instead
of input. This has the additional benefit of working with the output mixer's
gain fading, avoiding discontinuities from significant density gain changes.
2018-08-01 16:08:27 -07:00
Chris Robinson
aa58a5d208 Fix late reverb density gain blend weights
Now it only accounts for the representable frequency range (0.5 normalized, or
 0...pi radians instead of tau). Previously, the bulk of the weighting factors
was given to the HF decay (nearly 90%, given a 44.1khz sample rate and the
default 5khz reference), with low- and mid-frequency decays splitting the
remaining 10%. Now it's closer to 75%, matching the range of representable
frequencies above the reference.

This could probably be improved further due to human hearing being less
sensitive to higher frequencies, but that is much more complicated.
2018-08-01 02:48:31 -07:00
Chris Robinson
3894c580bf Use just the omnidirectional response for the compressor effect
This is not the output compressor/limiter, but the EFX effect. Consequently, it
simply compresses the dynamic range around 1.0 (boosting samples below it by up
to double, reducing samples above it by as much as half). This is not intended
to prevent clipping on the output, but to instead reduce the range between
quiet sounds and loud sounds.
2018-07-29 00:18:46 -07:00
Chris Robinson
f1bf932a84 Update ChangeLog 2018-07-28 14:11:12 -07:00
Chris Robinson
8ab448b119 Inline the autowah peaking filter processing 2018-07-28 14:03:28 -07:00
Chris Robinson
39a5d0cb94 Mark a couple parameters as unused 2018-07-25 13:15:47 -07:00
Raulshc
7d68eeac88 EFX: Enable 3D processing
Use channel 0 envelope for calculate the frequency in all channels.
2018-07-25 12:51:09 -07:00
Raulshc
92fd59fe6a EFX: Add 3D processing for autowah
Add 3D processing code. It can be activated at compilation time.
2018-07-25 12:51:09 -07:00
Raulshc
f79683d459 Alsoft-config: Add autowah effect 2018-07-25 12:51:09 -07:00
Raulshc
83dba26ea6 EFX: Autowah implementation
Add autowah effect using biquad peaking filter and envelope follower
2018-07-25 12:51:09 -07:00
Chris Robinson
809f709ba6 Limit the normalized filter frequency to under half
Nearing half, weird things can start happening with the filters' generated sine
and cosine values.
2018-07-21 14:22:52 -07:00
Chris Robinson
6fe1ffa3bb Improve handling of 0hz ring modulator frequency 2018-07-21 14:21:00 -07:00
Chris Robinson
d117a5209f On 32-bit targets with SSE, enable SSE/SSE2 codegen by default
Two new CMake options are available for 32-bit targets that accept -msse:
ALSOFT_ENABLE_SSE_CODEGEN and ALSOFT_ENABLE_SSE2_CODEGEN, which default to
TRUE. This should not affect MSVC, which already defaults to SSE2 codegen.
2018-07-16 08:41:56 -07:00
Chris Robinson
ed1f1d2bf3 Start an extension to allow source filter gains greater than 1 2018-07-15 21:01:26 -07:00
kcat
fd3f52ea36
Merge pull request #210 from qwertychouskie/patch-1
Fix COPYING
2018-07-02 18:38:57 -07:00
QwertyChouskie
4c61103e34
Fix COPYING
Remove bad chars, remove section that shouldn't be there.
2018-07-02 17:09:53 -07:00
kcat
dc3fa3e51f
Merge pull request #207 from t6/patch-sndio-oss
Prefer sndio backend over OSS when both are enabled
2018-06-22 11:49:00 -07:00
Tobias Kortkamp
e2d7c5dfb3
Prefer sndio over OSS when both are enabled
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
2018-06-22 14:36:33 +02:00
kcat
7e2cac5292
Merge pull request #204 from jhasse/android-byte-order
Correctly check byte order for newer Android compiler, fix #203
2018-06-20 12:53:22 -07:00
Jan Niklas Hasse
a80ab01227 Correctly check byte order for newer Android compiler, fix #203 2018-06-20 21:36:33 +02:00
Chris Robinson
73e08e51ba Properly get the full executable and pathname on FreeBSD 2018-06-08 19:49:13 -07:00
Chris Robinson
fd1458ce1b Always prepare the ALSA PCM handle before starting capture
Draining the ALSA device via stopping puts it into a setup state, which
requires re-preparing before playback can start again. Preparing it prior to
the first start seems to cause no harm, so just always do it before starting.
2018-06-08 05:02:47 -07:00
kcat
9c643f0356
Merge pull request #200 from kdhp/fix-199
Stop capture devices while closing
2018-06-07 19:30:34 -07:00
kdhp
35b78d55a4 Stop capture devices while closing
In 'alcCaptureCloseDevice', check if the capture device is
running and stop it if necessary.
This fixes the case where the device data is deallocated while
a background thread is still running (Issue #199)
2018-06-08 01:42:13 +00:00
Chris Robinson
bd9c6989c2 Clear the TLS pointer after running its destructor callback 2018-06-06 23:10:37 -07:00
Chris Robinson
72e4b60374 Clamp the maximum normalized reference frequency too 2018-06-03 01:52:05 -07:00
Chris Robinson
48b265e136 Use a higher normalized frequency limit for the ring modulator 2018-06-02 00:02:14 -07:00
Chris Robinson
7865ebb6d5 Use the biquad high-pass in the ring modulator 2018-05-31 22:21:00 -07:00
Chris Robinson
f765099503 Slightly simplify the modulator square wave generator 2018-05-31 19:43:02 -07:00
kcat
d5dd4937eb
Merge pull request #197 from Raulshc/Modulator
EFX: Modulator fixes
2018-05-31 19:38:42 -07:00
Raulshc
1bba276aaf
EFX: Ring modulator fixes
Change from unipolar to bipolar carrier signal in the Ring modulator effect.
2018-05-31 15:47:47 +02:00
Raulshc
5233c4aa21
Merge from kcat/master
Update git repository
2018-05-31 14:17:20 +02:00
Chris Robinson
0b7f35b289 Avoid extra sample copies and storage in the modulator effect 2018-05-29 22:55:21 -07:00
Chris Robinson
46c59f382f Use fastf2i instead of manual rounding in another place 2018-05-29 22:49:45 -07:00
Chris Robinson
8854720e8a Avoid separate in/out parameters when they're always the same 2018-05-29 22:15:49 -07:00
kcat
42d3235a66
Merge pull request #196 from rindeal/cmake-sse2-typo-fix
CMake: fix SSE3 typo
2018-05-29 16:24:42 -07:00
Jan Chren (rindeal)
5cba81cf35 CMake: fix SSE3 typo
Closes: https://github.com/kcat/openal-soft/issues/195
2018-05-29 18:32:30 +02:00
Chris Robinson
a5edf487dd Use a macro to handle common case formatting 2018-05-27 01:03:18 -07:00
Chris Robinson
728dd5a4e0 Avoid setting unnecessary variables 2018-05-26 20:43:05 -07:00
Chris Robinson
ac4061b9d2 Better sort the effect list in alsoft-config 2018-05-26 18:17:17 -07:00
Chris Robinson
ec84a107a4 Don't hardcode the max channels for HRTF B-Format decoding 2018-05-26 00:26:11 -07:00
Chris Robinson
803d331711 Improve formatting of the hilbert function 2018-05-24 00:16:50 -07:00
Chris Robinson
422cf429e6 Clamp the dither depth between 2 and 20 bits 2018-05-23 19:49:49 -07:00
Chris Robinson
93de5350b9 Add some LIKELY and ASSUME statements 2018-05-23 19:22:21 -07:00
Chris Robinson
9bf3ee722c Fix a function comment about a return value 2018-05-23 06:10:09 -07:00
Chris Robinson
1782208fde Remove unused function 2018-05-23 05:58:06 -07:00