aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.c
Commit message (Collapse)AuthorAgeFilesLines
* Add and use a copy-range string functionChris Robinson2016-02-241-4/+1
|
* Exclude the file extension from the HRTF nameChris Robinson2016-02-241-1/+9
|
* Replace the hrtf_tables option with hrtf-pathsChris Robinson2016-02-231-17/+32
|
* Allow selecting a preferred HRTF in alsoft-configChris Robinson2016-02-231-1/+1
| | | | This currently only checks the default paths when they're being used.
* Avoid enumerating the same HRTF file twiceChris Robinson2016-02-211-41/+40
|
* Add a config option to specify the preferred HRTFChris Robinson2016-02-211-0/+19
|
* Include the HRTF filename in the HRTF memory chunkChris Robinson2016-02-201-25/+25
|
* Use an 8-channel cube for HRTF's virtual format.Chris Robinson2016-02-201-102/+0
| | | | | | There were phase issues caused by applying HRTF directly to the B-Format channels, since the HRIR delays were all averaged which removed the inter-aural time-delay, which in turn removed significant spatial information.
* Allocate each HRTF as a single chunkChris Robinson2016-02-161-21/+39
|
* Calculate HRTF stepping params right before mixingChris Robinson2016-02-141-134/+0
| | | | | 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.
* Don't pass the channel count to GetBFormatHrtfCoeffsChris Robinson2016-02-091-6/+4
| | | | Since it's hard-coded anyway, there's no need to specify it.
* Use %s.mhr for the default hrtf table listChris Robinson2015-12-051-1/+1
|
* Use more accurate floating point literalsChris Robinson2015-11-061-1/+1
|
* Remove a couple unused parametersChris Robinson2015-10-241-16/+4
|
* Use the enumerated HRTF list for selecting an HRTFChris Robinson2015-10-061-135/+4
| | | | Also report the proper specifier of the one currently in use.
* Store the Hrtf struct with the corresponding HrtfEntryChris Robinson2015-10-061-16/+81
| | | | | Also store the filename with the Hrtf struct so it can be reused for multiple HrtfEntry objects.
* Enumerate and list HRTFs per-deviceChris Robinson2015-10-061-0/+91
|
* Fix B-Format HRTF decodingChris Robinson2015-09-231-5/+8
|
* Use N3D scaling instead of FuMaChris Robinson2015-09-231-4/+4
|
* Allow the hrtf_tables option to be device-specificChris Robinson2015-09-201-8/+7
|
* Rename F_2PI to F_TAUChris Robinson2015-09-131-3/+3
|
* Allow for device-specific config valuesChris Robinson2015-08-281-2/+2
|
* Use ACN ordering for ambisonics coefficients arraysChris Robinson2015-08-281-3/+3
| | | | | | Note that it still uses FuMa scalings internally. Coefficients loaded from config files specify if they're FuMa (in both ordering and scaling) or N3D, and will get reordered or rescaled as needed.
* Fix the HRTF B-Format decoder's W coefficientChris Robinson2015-02-141-18/+5
| | | | | And limit it to first-order again, since there will likely need to be extra scalings applied.
* Calculate HRTF coefficients for all B-Format channels at onceChris Robinson2015-02-101-29/+61
| | | | | | It's possible to calculate HRTF coefficients for full third-order ambisonics now, but it's still not possible to use them here without upmixing first-order content.
* Pass the (FuMa) channel number to GetBFormatHrtfCoeffsChris Robinson2015-02-101-6/+7
|
* Correct conversion from polar to cartesian coords for HRTFChris Robinson2015-02-101-3/+3
| | | | | A functional no-op (cos(a) == cos(-a), -sin(a) == sin(-a)), but Ambisonics expects the azimuth angle to go counter-clockwise.
* Use B-Format for HRTF's virtual output formatChris Robinson2015-02-091-1/+83
| | | | | | | | This adds the ability to directly decode B-Format with HRTF, though only first- order (WXYZ) for now. Second- and third-order would be easilly doable, however we'd need to be able to up-mix first-order content (from the BFORMAT2D and BFORMAT3D buffer formats) since it would be inappropriate to decode lower-order content with a higher-order decoder.
* Make CalcHrtfDelta more genericChris Robinson2014-11-241-34/+1
|
* Rename step to stepsChris Robinson2014-11-241-4/+4
|
* Swap delta and step, remove double semicolonsChris Robinson2014-11-231-15/+15
|
* Partially revert "Use a different method for HRTF mixing"Chris Robinson2014-11-231-10/+204
| | | | | | | | | | | | The sound localization with virtual channel mixing was just too poor, so while it's more costly to do per-source HRTF mixing, it's unavoidable if you want good localization. This is only partially reverted because having the virtual channel is still beneficial, particularly with B-Format rendering and effect mixing which otherwise skip HRTF processing. As before, the number of virtual channels can potentially be customized, specifying more or less channels depending on the system's needs.
* Use a different method for HRTF mixingChris Robinson2014-11-221-210/+12
| | | | | | | | | | | | | | | | | | | | | | | This new method mixes sources normally into a 14-channel buffer with the channels placed all around the listener. HRTF is then applied to the channels given their positions and written to a 2-channel buffer, which gets written out to the device. This method has the benefit that HRTF processing becomes more scalable. The costly HRTF filters are applied to the 14-channel buffer after the mix is done, turning it into a post-process with a fixed overhead. Mixing sources is done with normal non-HRTF methods, so increasing the number of playing sources only incurs normal mixing costs. Another benefit is that it improves B-Format playback since the soundfield gets mixed into speakers covering all three dimensions, which then get filtered based on their locations. The main downside to this is that the spatial resolution of the HRTF dataset does not play a big role anymore. However, the hope is that with ambisonics- based panning, the perceptual position of panned sounds will still be good. It is also an option to increase the number of virtual channels for systems that can handle it, or maybe even decrease it for weaker systems.
* Update COPYING to the latest ↵François Cami2014-08-181-2/+2
| | | | https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt to fix the FSF' address Fix the FSF' address in the source
* Properly scale the first HRTF pass-through coefficientChris Robinson2014-07-171-4/+8
| | | | | Coefficients are scaled by 32767. For pass-through, this is attenuated by sqrt(0.5) to maintain a consistent perceived volume.
* Cleanup some HRTF codeChris Robinson2014-07-161-68/+53
| | | | Use loops instead of duplicating code, rewrite some lines to be clearer.
* Fix omni-directional moving HRTF coeffsChris Robinson2014-07-141-4/+4
|
* Add a source radius property that determines the directionality of a soundChris Robinson2014-07-111-32/+56
| | | | | | | | | At 0 distance from the listener, the sound is omni-directional. As the source and listener become 'radius' units apart, the sound becomes more directional. With HRTF, an omni-directional sound is handled using 0-delay, pass-through filter coefficients, which is blended with the real delay and coefficients as needed to become more directional.
* Only set the needed HRTF coefficientsChris Robinson2014-06-211-2/+2
|
* Don't pass the device to HRTF methodsChris Robinson2014-06-201-9/+8
|
* Move PATH_MAX fallback definitions to alMain.hChris Robinson2014-02-271-10/+0
|
* Add back the missing PATH_MAX fallbackChris Robinson2014-02-271-0/+10
|
* Move OpenDataFile to helpers.c so other sources can use itChris Robinson2014-02-271-131/+0
|
* Don't fallback to relative filename handling if opening as absolute failsChris Robinson2014-02-261-26/+27
|
* Expand environment variables for all config option values when loadingChris Robinson2014-02-261-30/+1
|
* Support environment variables in the hrtf_tables config valueChris Robinson2014-02-251-4/+34
|
* Move HRTF macros and function declarations to a separate headerChris Robinson2014-02-231-0/+1
|
* Move the default hrtf table to an external fileChris Robinson2014-02-231-30/+12
|
* Add a return value to FindHrtfFormatChris Robinson2014-02-231-1/+2
|
* Search system-dependant data paths for relative hrtf table filenamesChris Robinson2014-02-231-1/+126
|