aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/panning.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace more ALuint with ALsizeiChris Robinson2017-01-291-4/+4
|
* Improve the ambisonic upscaling methodsChris Robinson2017-01-241-29/+40
| | | | | | | | This now takes advantage of the differences seen in generated decoder matrices for first-order compared to second- and third-order, such that with the appropriate frequency-dependent scaling applied to first-order content, the result is identical with a higher-order decoder matrix compared to a first- order matrix for the same layout.
* Fix coefficient counts for the built-in B-Format decodersChris Robinson2017-01-211-2/+2
|
* Use a flat sqrt(2) scale for non-directional ambient gainsChris Robinson2017-01-211-8/+3
|
* Update the default basic B-Format decodersChris Robinson2017-01-211-47/+36
| | | | This also converts them to ACN/N3D format.
* Move the B-Format HRTF virtual speaker stuff to InitHrtfPanningChris Robinson2017-01-181-7/+55
| | | | | This keeps the decoder matrices and coefficient mapping together for if it changes in the future.
* Use ALsizei in more placesChris Robinson2017-01-181-14/+14
|
* More ALsizei, with the B-Format decoderChris Robinson2017-01-161-2/+2
|
* Use ALsizei for sizes and offsets with the mixerChris Robinson2017-01-161-24/+24
| | | | | | 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.
* Use second-order ambisonics for basic HRTF renderingChris Robinson2017-01-151-9/+48
| | | | | | This should improve positional quality for relatively low cost. Full HRTF rendering still only uses first-order since the only use of the dry buffer there is for first-order content (B-Format buffers, effects).
* Be clearer about whether full or basic HRTF rendering is usedChris Robinson2016-11-021-1/+4
|
* Remove use of DECL_CONSTChris Robinson2016-09-061-1/+1
| | | | | No idea if it was really gaining us anything, but removing it fixes a crash I was getting with libs built with Clang.
* Combine related members into a structChris Robinson2016-08-241-25/+26
|
* Use a more specialized mixer function for B-Format to HRTFChris Robinson2016-08-121-14/+4
|
* Decode directly from B-Format to HRTF instead of a cubeChris Robinson2016-08-111-39/+22
| | | | | | | | | | | | | | | | | | | | | Last time this attempted to average the HRIRs according to their contribution to a given B-Format channel as if they were loudspeakers, as well as averaging the HRIR delays. The latter part resulted in the loss of the ITD (inter-aural time delay), a key component of HRTF. This time, the HRIRs are averaged similar to above, except instead of averaging the delays, they're applied to the resulting coefficients (for example, a delay of 8 would apply the HRIR starting at the 8th sample of the target HRIR). This does roughly double the IR length, as the largest delay is about 35 samples while the filter is normally 32 samples. However, this is still smaller the original data set IR (which was 256 samples), it also only needs to be applied to 4 channels for first-order ambisonics, rather than the 8-channel cube. So it's doing twice as much work per sample, but only working on half the number of samples. Additionally, since the resulting HRIRs no longer rely on an extra delay line, a more efficient HRTF mixing function can be made that doesn't use one. Such a function can also avoid the per-sample stepping parameters the original uses.
* Use the ACN and N3D map and scale lookup tables in SetChannelMapChris Robinson2016-08-021-16/+9
|
* Remove DevFmtBFormat3D, which is covered by DevFmtAmbi1Chris Robinson2016-07-311-18/+1
|
* Add an option to specify the ambisonic output configurationChris Robinson2016-07-311-26/+31
|
* Add a stand-alone upsampler for higher-order ambisonic oputputChris Robinson2016-07-301-0/+19
|
* Add a config to output first-, second-, or third-order ambisonicsChris Robinson2016-07-291-1/+41
| | | | | | | | | Currently incomplete, as second- and third-order output will not correctly handle B-Format input buffers. A standalone up-sampler will be needed, similar to the high-quality decoder. Also, output is ACN ordering with SN3D normalization. A config option will eventually be provided to change this if desired.
* Update the default quad decoder matrixChris Robinson2016-07-181-4/+4
|
* Constify and use the correct size for an arrayChris Robinson2016-07-171-1/+1
|
* Update comment about the source radius calculationsChris Robinson2016-07-101-9/+18
|
* Avoid function calls to get the HRTF sample rate and IR sizeChris Robinson2016-07-071-2/+2
|
* Avoid using memcpy to copy a single structChris Robinson2016-07-061-4/+4
|
* Use a macro to specify the ambisonic periphonic channel maskChris Robinson2016-06-011-2/+2
|
* Recognize AUX0...AUX15 for decoder speaker labelsChris Robinson2016-05-121-3/+11
|
* Improve radius behavior with scaling of ambisonic coefficientsChris Robinson2016-04-241-5/+52
|
* Increase max output channels to 16Chris Robinson2016-04-191-11/+14
| | | | This also enables fully periphonic 3rd order HQ decoding.
* Combine two if checks into oneChris Robinson2016-04-191-5/+3
|
* Remove unneeded ChannelMaps for BFormat formatsChris Robinson2016-04-171-14/+2
|
* Avoid storing channel names for the dry bufferChris Robinson2016-04-161-22/+10
|
* Reorganize a bit of aluInitRenderer codeChris Robinson2016-04-161-46/+30
|
* Silence possible out-of-bounds warning againChris Robinson2016-04-161-1/+1
|
* More directly map coefficients for ambisonic mixing buffersChris Robinson2016-04-151-71/+95
| | | | | | 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-3/+3
|
* Avoid mixing all coefficients together when only some are usedChris Robinson2016-04-151-34/+38
|
* Fix possible out-of-bounds warningChris Robinson2016-04-151-2/+2
|
* Avoid unnecessary loops for setting up effect slot b-format buffer mixingChris Robinson2016-04-141-12/+28
|
* Prepare the custom decoder in aluInitRendererChris Robinson2016-04-141-200/+193
|
* Move the InitRenderer method to panning.cChris Robinson2016-04-141-3/+168
|
* Split aluInitPanning into separate functions for HRTF or UHJChris Robinson2016-04-141-245/+234
|
* Allow dual-band decoders for basic renderingChris Robinson2016-03-301-8/+2
| | | | | Since the basic renderer does not do frequency-dependent processing, the high- frequency matrix is used for panning.
* Use the same option for decoder configsChris Robinson2016-03-261-1/+5
|
* Don't use custom decoder configurations with mono or stereoChris Robinson2016-03-261-0/+13
| | | | | | | | | | By default, stereo outputs using UHJ, which renders to a B-Format buffer that gets run through a UHJ encoder for output. It may also output using pair-wise panning, which pans between -30 and +30 degrees with the speakers at the two ends. In both cases, the stereo coefficients are ignored. Mono, having only one output channel, can realistically only attenuate its channel. Turning the volume up and down accomplishes the same result.
* Add a config option for distance compensationChris Robinson2016-03-261-2/+8
|
* Allow up to third-order for horizontal-only renderingChris Robinson2016-03-261-16/+26
|
* Include any first-order scaling in the FOAOut coefficientsChris Robinson2016-03-251-15/+32
|
* Skip height-related ambisonic channels for 2D renderingChris Robinson2016-03-251-2/+16
|
* Use the "decoder" config section instead of "ambisonics"Chris Robinson2016-03-251-1/+1
|