aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use a few more HRIRs for the HRTF B-Format decoderChris Robinson2016-09-071-19/+31
| | | | | 14 in total, an 8-point cube and a 6-point diamond shape, to help improve sound localization a bit. Incurs no real extra CPU cost once the IRs are built.
* Check for run-time NEON support by reading /proc/cpuinfoChris Robinson2016-09-071-2/+32
| | | | | | Less than ideal since documentations warn it may not list 'neon' even if it's really supported. However, the "proper" APIs to check for NEON extensions don't seem to exist in my toolchain.
* Simplify mmdevapi's device name searchChris Robinson2016-09-071-17/+33
| | | | | Avoids converting each enumerated devid from WSTR to UTF-8, and instead just converts the device name from UTF-8 to WSTR once if needed.
* Merge pull request #65 from Dmytry/dmytry_github_masterkcat2016-09-072-8/+46
|\ | | | | mmdevapi: Allow specifying output device by it's audio endpoint GUID …
| * mmdevapi: Allow specifying output device by it's audio endpoint GUID or by ↵Dmytry Lavrov2016-09-062-8/+46
| | | | | | | | the device id string (Oculus VR api requires you to play back on a specific device).
* | Properly align 16-bit fields in the Hrtf structChris Robinson2016-09-071-10/+20
| |
* | Use unsigned int shifts for device flagsChris Robinson2016-09-071-5/+5
|/
* Make the SelectMixer function sharableChris Robinson2016-09-064-26/+14
|
* Use the optimized mixing functions for reverb outputChris Robinson2016-09-061-83/+117
|
* Use deinterlaced buffers for the intermediate reverb storageChris Robinson2016-09-061-119/+137
|
* Remove use of DECL_CONSTChris Robinson2016-09-065-19/+17
| | | | | No idea if it was really gaining us anything, but removing it fixes a crash I was getting with libs built with Clang.
* Do reverb modulation before band-pass filteringChris Robinson2016-09-061-7/+6
| | | | | | | Ideally the band-pass should probably happen closer to output, like gain is. However, doing that would require 16 filters (4 early + 4 late channels, each with a low-pass and high-pass filter), compared to the two needed to do it on input.
* Rename some variables for clarityChris Robinson2016-09-061-28/+30
|
* Use more correct cube decoder matricesChris Robinson2016-09-052-16/+16
|
* Do multiple samples at once for reverb modulationChris Robinson2016-09-051-38/+49
|
* Use a predefined identity matrixChris Robinson2016-09-055-30/+14
|
* Correct a comment about B-Format conversionChris Robinson2016-09-051-1/+1
|
* Rename MatrixMixerFunc to RowMixerFuncChris Robinson2016-09-026-14/+14
|
* Calculate a variable closer to where it's usedChris Robinson2016-09-011-5/+5
|
* Use MixMatrixRow to upsample the split frequency bands to the outputChris Robinson2016-09-011-30/+12
|
* Remove unnecessary constsChris Robinson2016-08-311-4/+4
| | | | They were causing GCC's built-in atomic cmpxchg to complain.
* Reorganize sample type conversion functionsChris Robinson2016-08-311-286/+129
| | | | To help avoid redundant manual definitions.
* Always load HRTF files through memory pointersChris Robinson2016-08-311-261/+134
|
* Add some helper wrappers to mmap filesChris Robinson2016-08-312-0/+120
|
* Initialize some enums to dummy valuesChris Robinson2016-08-311-8/+9
|
* Add a compile-time macro to use dual-band ambisonic HRTF processingChris Robinson2016-08-301-12/+36
| | | | | Use single-band processing for now, to see if dual-band is causing a drop in quality at all.
* Simplify the ambisonic up-samplerChris Robinson2016-08-301-65/+99
| | | | | It still behaves the same, although now combines the separate decode+encode matrices into a transcode matrix (one per frequency band).
* Print whether direct channels are off or on to stdout in alffplayChris Robinson2016-08-291-1/+4
|
* Add an option to alffplay to toggle AL_DIRECT_CHANNELS_SOFTChris Robinson2016-08-291-0/+22
| | | | | Using the 'd' key will toggle the playback source's AL_DIRECT_CHANNELS_SOFT property. Although there is no visual feedback showing when it's on or off.
* Remove the upper limit from AL_MIN_GAIN and AL_MAX_GAINChris Robinson2016-08-292-4/+4
| | | | As per the current AL_SOFT_gain_clamp_ex proposal.
* Add a query for the maximum source gain limitChris Robinson2016-08-283-0/+32
|
* Clamp the maximum mixing gain boost to 16Chris Robinson2016-08-272-10/+13
| | | | | | 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.
* Allow sources to play while alcSuspendContext is in effectChris Robinson2016-08-264-11/+22
| | | | | | | | | | | | | | This appears to be how Creative's Windows drivers handle it, and is necessary for at least the Windows version of UT2k4 (otherwise it tries to play a source while suspended, checks and sees it's stopped, then kills it before it's given a chance to start playing). Consequently, the internal properties it gets mixed with are determined by what the source properties are at the time of the play call, and the listener properties at the time of the suspend call. This does not change alDeferUpdatesSOFT, which will still hold the play state change until alProcessUpdatesSOFT.
* Avoid directly replacing the effect slot Update pointerChris Robinson2016-08-251-14/+10
|
* Properly defer effect slot changesChris Robinson2016-08-254-14/+37
| | | | | | | | Note that this now also causes all playing sources to update when an effect slot is updated. This is a bit wasteful, as it should only need to re-update sources that are using the effect slot (and only when a relevant property is changed), but it's good enough. Especially with deferring since all playing sources are going to get updated on the process call anyway.
* Track all references for effect statesChris Robinson2016-08-252-30/+53
| | | | | | | | This allows us to not have to play around with trying to avoid duplicate state pointers, since the reference count will ensure they're deleted as appropriate. The only caveat is that the mixer is not allowed to decrement references, since that can cause the object to be freed (which the mixer code is not allowed to do).
* Add a ref count to ALeffectStateChris Robinson2016-08-2513-203/+325
| | | | | This is mostly just reorganizing the effects to call the Construct method which initializes the ref count.
* Also rotate stereo sounds in the alhrtf exampleChris Robinson2016-08-241-2/+22
|
* Consolidate duplicate codeChris Robinson2016-08-241-39/+23
|
* Combine related members into a structChris Robinson2016-08-246-84/+87
|
* Make a function definition staticChris Robinson2016-08-231-1/+1
|
* Hold updates for both listener and source updatesChris Robinson2016-08-232-12/+15
|
* Don't pass the context's distance model as the source'sChris Robinson2016-08-235-14/+24
|
* Avoid resupplying unneeded source updatesChris Robinson2016-08-236-92/+91
| | | | | The source's voice holds a copy of the last properties it received, so listener updates can make sources recalculate internal properties from that stored copy.
* Remove an unneeded typedefChris Robinson2016-08-211-5/+0
|
* Band-split the HRIRs when building the ambisonic decoder filtersChris Robinson2016-08-213-31/+68
| | | | | This allows each HRIR to contribute a frequency-dependent response, essentially acting like a dual-band decoder playing over the cube speaker array.
* Fix HRTF index calculations for B-Format coefficientsChris Robinson2016-08-181-11/+10
| | | | | | | The CalcEvIndices and CalcAzIndices methods were dependent on the FPU being in round-to-zero mode, which is not the case for panning initialization. And since we just need the closest index and don't need to lerp between them, it's better to just directly calculate the index with rounding.
* Only use the cube points for generating the ambisonic HRTF coefficientsChris Robinson2016-08-171-56/+72
| | | | | | | | | | | Using all the HRIRs seems to have problems with volume balancing, due in part to HRTF data sets not having uniform enough measurements for a simple decoder matrix to work (and generating a proper one that would work better is not that easy). This still maintains the benefits of decoding ambisonics directly to HRTF, namely that it only needs to filter the 4 ambisonic channels and can use more optimized HRTF filtering methods on those channels. It can also be improved further with frequency-dependent processing baked into the generated coefficients, incurring no extra run-time cost for it.
* Use a more specialized mixer function for B-Format to HRTFChris Robinson2016-08-129-27/+66
|
* Decode directly from B-Format to HRTF instead of a cubeChris Robinson2016-08-115-42/+109
| | | | | | | | | | | | | | | | | | | | | 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.