aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
Commit message (Collapse)AuthorAgeFilesLines
* Use ALsizei for the fir4 resampler fractionChris Robinson2017-04-121-1/+1
|
* Add a sample converterChris Robinson2017-04-101-0/+10
| | | | | | | | | | This is intended to do conversions for interleaved samples, and supports changing from one DevFmtType to another as well as resampling. It does not handle remixing channels. The mixer is more optimized to use the resampling functions directly. However, this should prove useful for recording with certain backends that won't do the conversion themselves.
* Handle the source offset fraction as an ALsizeiChris Robinson2017-04-081-2/+2
|
* Pre-compute the sinc4 resampler coefficient tableChris Robinson2017-04-081-4/+3
|
* Store the HRIR coeff pointer and delays directly in MixHrtfParamsChris Robinson2017-03-121-1/+2
|
* Rework HRTF coefficient fadingChris Robinson2017-03-111-11/+8
| | | | | | | | | | | | | | | This improves fading between HRIRs as sources pan around. In particular, it improves the issue with individual coefficients having various rounding errors in the stepping values, as well as issues with interpolating delay values. It does this by doing two mixing passes for each source. First using the last coefficients that fade to silence, and then again using the new coefficients that fade from silence. When added together, it creates a linear fade from one to the other. Additionally, the gain is applied separately so the individual coefficients don't step with rounding errors. Although this does increase CPU cost since it's doing two mixes per source, each mix is a bit cheaper now since the stepping is simplified to a single gain value, and the overall quality is improved.
* Make the voice's 'moving' state a bitflagChris Robinson2017-03-111-5/+4
|
* Implement NFC filters for Ambisonic renderingChris Robinson2017-03-101-1/+8
| | | | | | | | | | | | | | NFC filters currently only work when rendering to ambisonic buffers, which includes HQ rendering and ambisonic output. There are two new config options: 'decoder/nfc' (default on) enables or disables use of NFC filters globally, and 'decoder/nfc-ref-delay' (default 0) specifies the reference delay parameter for NFC-HOA rendering with ambisonic output (a value of 0 disables NFC). Currently, NFC filters rely on having an appropriate value set for AL_METERS_PER_UNIT to get the correct scaling. HQ rendering uses the averaged speaker distances as a control/reference, and currently doesn't correct for individual speaker distances (if the speakers are all equidistant, this is fine, otherwise per-speaker correction should be done as well).
* Move ALvoice declaration to alu.hChris Robinson2017-03-091-1/+55
|
* Ensure a non-playing or -paused source does not use a mixing voiceChris Robinson2017-02-251-1/+1
|
* Remove CalcXYZCoeffs and inline CalcAngleCoeffsChris Robinson2017-02-231-13/+9
|
* Alter how panpot/pair-wise panning worksChris Robinson2017-02-231-0/+10
| | | | | | | | | | | | | | | | | | | This change allows pair-wise panning to mostly go through the normal ambisonic panning methods, with one special-case. First, a term is added to the stereo decoder matrix's X coefficient so that a centered sound is reduced by -3dB on each output channel. Panning in front creates a similar gain response to the typical L = sqrt(1-pan) R = sqrt(pan) for pan = [0,1]. Panning behind the listener can reduce (up to) an additional -10dB, creating a audible difference between front and back sounds as if simulating head obstruction. Secondly, as a special-case, the source positions are warped when calculating the ambisonic coefficients so that full left panning is reached at -30 degrees and full right at +30 degrees. This is to retain the expected 60-degree stereo width. This warping does not apply to B-Format buffer input, although it otherwise has the same gain responses.
* Remove the sinc8 resampler optionChris Robinson2017-02-191-12/+2
| | | | | Perf shows less than 1 percent CPU difference from the higher quality bsinc resampler, but uses almost twice as much memory (a 128KB lookup table).
* Put BsincState in a generic unionChris Robinson2017-02-131-1/+5
|
* Replace some ALvoid with voidChris Robinson2017-01-181-3/+3
|
* Use ALsizei in more placesChris Robinson2017-01-181-7/+7
|
* Pass the left and right buffers to the hrtf mixers directlyChris Robinson2017-01-171-5/+5
|
* Use ALsizei and ALint for sizes and offsets with resamplers and filtersChris Robinson2017-01-161-1/+2
|
* Use ALsizei for sizes and offsets with the mixerChris Robinson2017-01-161-13/+13
| | | | | | Unsigned 32-bit offsets actually have some potential overhead on 64-bit targets for pointer/array accesses due to rules on integer wrapping. No idea how much impact it has in practice, but it's nice to be correct about it.
* Add some more 'restrict' keywordsChris Robinson2016-10-061-1/+1
|
* Remove an unused structChris Robinson2016-10-051-6/+0
|
* Pass current and target gains directly for mixingChris Robinson2016-10-051-2/+3
|
* Make some pointer-to-array parameters constChris Robinson2016-10-041-2/+3
|
* Mark a global variable declaration as externChris Robinson2016-09-111-1/+1
|
* Make the SelectMixer function sharableChris Robinson2016-09-061-0/+2
|
* Use a predefined identity matrixChris Robinson2016-09-051-0/+1
|
* Rename MatrixMixerFunc to RowMixerFuncChris Robinson2016-09-021-3/+3
|
* Clamp the maximum mixing gain boost to 16Chris Robinson2016-08-271-0/+2
| | | | | | The combined source and listener gains now can't exceed a multiplier of 16 (~24dB). This is to avoid mixes getting out of control with large volume boosts, which reduces the effective precision given by floating-point.
* Use a more specialized mixer function for B-Format to HRTFChris Robinson2016-08-121-0/+4
|
* Move the input channel array out of the DirectParams and SendParamsChris Robinson2016-07-131-13/+9
|
* Store the voice output buffers separate from the paramsChris Robinson2016-07-111-6/+0
|
* Use SSE for applying the HQ B-Format decoder matricesChris Robinson2016-05-311-0/+3
|
* Use floats for the listener transformsChris Robinson2016-05-161-25/+0
|
* Don't store the source's update method with the voiceChris Robinson2016-05-161-3/+0
|
* Avoid separate updates to sources that should apply togetherChris Robinson2016-05-151-2/+0
|
* Provide asynchronous property updates for sourcesChris Robinson2016-05-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This necessitates a change in how source updates are handled. Rather than just being able to update sources when a dependent object state is changed (e.g. a listener gain change), now all source updates must be proactively provided. Consequently, apps that do not utilize any deferring (AL_SOFT_defer_updates or alcSuspendContext/alcProcessContext) may utilize more CPU since it'll be filling out more update containers for the mixer thread to use. The upside is that there's less blocking between the app's calling thread and the mixer thread, particularly for vectors and other multi-value properties (filters and sends). Deferring behavior when used is also improved, since updates that shouldn't be applied yet are simply not provided. And when they are provided, the mixer doesn't have to ignore them, meaning the actual deferring of a context doesn't have to synchrnously force an update -- the process call will send any pending updates, which the mixer will apply even if another deferral occurs before the mixer runs, because it'll still be there waiting on the next mixer invocation. There is one slight bug introduced by this commit. When a listener change is made, or changes to multiple sources while updates are being deferred, it is possible for the mixer to run while the sources are prepping their updates, causing some of the source updates to be seen before the other. This will be fixed in short order.
* Find a valid source buffer before updating the voiceChris Robinson2016-05-091-2/+3
|
* Improve radius behavior with scaling of ambisonic coefficientsChris Robinson2016-04-241-5/+6
|
* More directly map coefficients for ambisonic mixing buffersChris Robinson2016-04-151-3/+22
| | | | | | Instead of looping over all the coefficients for each channel with multiplies, when we know only one will have a non-0 factor for ambisonic mixing buffers, just index the one with a non-0 factor.
* Update some commentsChris Robinson2016-04-151-4/+5
|
* Avoid mixing all coefficients together when only some are usedChris Robinson2016-04-151-1/+1
|
* Avoid unnecessary loops for setting up effect slot b-format buffer mixingChris Robinson2016-04-141-0/+2
|
* Move the InitRenderer method to panning.cChris Robinson2016-04-141-3/+13
|
* Split aluInitPanning into separate functions for HRTF or UHJChris Robinson2016-04-141-0/+2
|
* Add config options to enable the hq ambisonic decoderChris Robinson2016-03-161-2/+1
|
* Add a dual-band ambisonic decoderChris Robinson2016-03-151-1/+2
| | | | | | | | | | This uses a virtual B-Format buffer for mixing, and then uses a dual-band decoder for improved positional quality. This currently only works with first- order output since first-order input (from the AL_EXT_BFROMAT extension) would not sound correct when fed through a second- or third-order decoder. This also does not currently implement near-field compensation since near-field rendering effects are not implemented.
* Use the real output's left and right channels with HRTFChris Robinson2016-03-111-2/+2
|
* Calculate HRTF stepping params right before mixingChris Robinson2016-02-141-7/+11
| | | | | This means we track the current params and the target params, rather than the target params and the stepping. This closer matches the non-HRTF mixers.
* Calculate channel gain stepping just before mixingChris Robinson2016-02-141-9/+11
|
* Rename ComputeBFormatGains to ComputeFirstOrderGainsChris Robinson2016-01-311-5/+5
|