aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alu.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add the ability to start a voice at a particular timeChris Robinson2022-11-031-1/+5
|
* Track if doing 2D mixing onlyChris Robinson2022-09-041-3/+6
| | | | And use it to select the proper HF scales
* Add a 2D fourth-order upsamplerChris Robinson2022-08-271-0/+3
| | | | This will be necessary for 2D fourth-order sources with 3D fourth-order output.
* Don't mark a non-constexpr-able function as constexprChris Robinson2022-08-261-1/+1
| | | | | It can't be constexpr because it needs write access to an std::array, and because of std::sqrt.
* Simplify calculating the ambisonic rotator coefficientsChris Robinson2022-08-261-34/+33
|
* Fix W input mixing when non-0 coverageChris Robinson2022-08-261-15/+25
| | | | | | When upsampling certain ambisonic formats, the W channel may contribute to other output channels even with full coverage. Make sure they're taken into account.
* Create and use 2D upsampling matricesChris Robinson2022-08-251-7/+27
|
* Apply the upsampler before rotationChris Robinson2022-08-251-84/+23
| | | | | | | | Although this will necessitate applying a full device-order rotation for all ambisonic sources, it should be slightly better since it's effectively rotated after being mixed to higher order. This will also allow using more optimized upsamplers for 2D ambisonic sources vs 3D (while still allowing the sources to be rotated in 3D).
* Skip LFE for aux send gains with Direct ChannelsChris Robinson2022-08-181-0/+4
|
* Fix the channel spread for aux send gains with full HRTFChris Robinson2022-08-181-1/+1
|
* Inline and precompute some CalcDirectionCoeffs callsChris Robinson2022-08-181-1/+1
|
* Use a decode-encode method for ambisonic upsamplingChris Robinson2022-08-151-6/+107
| | | | | | | | This should allow for clearer and less diffuse responses. While a cube is in the blindspots for second-order, resulting in an identify transform for first- to-second-order, they do start contributing to third-order channels, which should make for sharper virtual points. The fixed HF scales should also play nicer with larger order upmixes.
* Avoid putting a 1KB array on the stackChris Robinson2022-08-021-6/+6
|
* Rework multi-channel source radius handlingChris Robinson2022-08-021-50/+118
| | | | | | | | Rather than applying the calculated spread to each virtual channel, the spread indicates how much the virtual channels surround the listener. At full spread, the channels retain their virtual speaker positions, while at no spread, all channels converge on the source position. This behavior is more consistent with B-Format sources.
* Change an inline function to a class methodChris Robinson2022-08-021-4/+4
|
* Use an intrusive_ptr to hold on to the EffectStateChris Robinson2022-07-291-3/+3
|
* Use the reverb air absorption for the send pathsChris Robinson2022-07-191-9/+7
|
* Add a config compat option for NFC distance scalingChris Robinson2022-07-071-6/+10
| | | | | | | | | | | | Currently there's no way for an application to specify the "real world" scale for in-game units. If the game doesn't use one unit to represent what should be perceived as one meter to the user, the NFC filter's effect will be too near or too far sounding. This allows adjusting the unit scale as applied to the NFC filters only, correcting the misalignment. This also removes the influence of EFX's MetersPerUnit from the NFC filters, since many games don't use it, and those that do won't know it also influences the perceived wave curvature along with the air absorption strength.
* Don't apply effect auto send adjustments for non-reverb effectsChris Robinson2022-06-161-1/+1
|
* Avoid a virtual function call to set the decoder widthChris Robinson2022-05-171-1/+1
|
* Use virtual functions for the decoderChris Robinson2022-05-141-1/+1
|
* Use an array of pointers for the UHJ encoder inputChris Robinson2022-05-061-1/+1
|
* Fully protect disconnection with the mixer counterChris Robinson2022-04-251-36/+36
|
* Use a type alias to simplify using a typeChris Robinson2022-04-251-7/+8
|
* Clean up some case spaghettiChris Robinson2022-04-251-13/+10
|
* Rename lerp to avoid conflicts with C++20's std::lerpChris Robinson2022-04-061-8/+8
|
* Limit the super stereo width factor to 0.7Chris Robinson2022-04-041-1/+1
|
* Avoid some redundant variable assignmentsChris Robinson2022-03-301-12/+6
|
* Add options to reverse local X and Y coordinatesChris Robinson2022-03-101-2/+6
| | | | | To go along with reverse-z on the other axii. This is only for games that have position/orientation errors causing top-bottom (or left-right) inversion.
* Add a config option for reverse-zChris Robinson2022-03-101-18/+8
| | | | | | The same as the __ALSOFT_REVERSE_Z env var, but in the config file. Should only be used for per-game config files (either along side the executable, or setting the ALSOFT_CONF env var when launching the app).
* Fix applying air absorptionChris Robinson2022-03-021-20/+20
|
* Move some temp variables closer to where they're usedChris Robinson2022-03-021-69/+67
|
* Rework source send distance attenuation handlingChris Robinson2022-03-021-61/+77
| | | | | | | | Specifically, AL_[EAX]REVERB_ROOM_ROLLOFF_FACTOR always applies to an inverse distance rolloff model, where the source's AL_ROOM_ROLLOFF_FACTOR applies to the selected distance model. Consequently, the normal distance and cone attenuation only needs to be calculated once for all sends, with the effect's room rolloff calculated and applied separately.
* Rework the initial reverb decayChris Robinson2022-03-011-41/+32
| | | | | | | | | | | | | | | | | | The idea here is that the initial reverb decay can't become less than the dry path distance attenuation, as the dry attenuation represents the audio that has not yet had a chance to start reflecting in the environment. As well, the reference distance indicates where there is no distance attenuation, with any initial attenuation set by the environment itself. So what we do is use the dry path attenuation as the baseline for what's mixed to the reverb, with the decay rate indicating how much of the remaining room (non-direct) energy attenuates with distance. This may be over-complicating it. Other sources hint at a more typical XdB per doubling of distance, with X varying depending on environment properties (room size, absorbancy, etc). This could be handled by applying a normal inverse distance attenuation model, with a rolloff factor generated from the reverb properties (density, decay rate, etc). Will need more testing and research.
* Make some local constexpr variables staticChris Robinson2022-02-231-5/+5
|
* Handle AirAbsorptionGainHF as a native context propertyChris Robinson2022-02-081-1/+3
|
* Combine listener and context updatesChris Robinson2022-02-081-18/+7
|
* Avoid a magic numberChris Robinson2022-02-011-1/+1
|
* Remove math_defs.hChris Robinson2022-01-271-2/+4
|
* Get rid of MathDefsChris Robinson2022-01-271-9/+12
|
* Use a bitset instead of a plain uint for flagsChris Robinson2021-12-231-5/+5
|
* Don't do direct channels with UHJ outputChris Robinson2021-12-211-1/+3
| | | | | | | | | | Directly mixing a non-UHJ stereo signal into a UHJ stereo signal results in a non-UHJ stereo signal. Such a mix can't be properly decoded anymore. An option can probably be added for users that intend to listen to UHJ output undecoded and let a stereo sound come through as-is on their speakers, but it probably shouldn't be the default for cases where the output may be decoded back.
* Move the effects base and effectslot to coreChris Robinson2021-12-171-2/+2
|
* Add source properties for Super StereoChris Robinson2021-12-151-0/+3
| | | | | When playing a stereo format, enabling Super Stereo causes the source to behave as a B-Format source, with a variable width control.
* Make an inline function to check for 2D ambisonic formatsChris Robinson2021-12-121-7/+3
|
* Add an internal Super Stereo formatChris Robinson2021-12-111-7/+7
| | | | | | | It's not available as an AL buffer format (yet) since I'm not sure how to expose it. Internally it seems fine as a separate channel configuration, but because OpenAL combines the channel configuration and sample type, a flag may work better there.
* Don't clamp the distance with distance attenuation disabledChris Robinson2021-11-301-1/+0
|
* Avoid passing spans unnecessarilyChris Robinson2021-11-251-2/+2
|
* Fix cone angle calculation (#605)Devin Braune2021-10-141-1/+1
|
* Avoid manually prefixing EventType_ enumsChris Robinson2021-10-101-5/+5
| | | | And use a better fitting type that matches how it's used