aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
Commit message (Collapse)AuthorAgeFilesLines
* Add a ref count to ALeffectStateChris Robinson2016-08-2510-203/+309
| | | | | This is mostly just reorganizing the effects to call the Construct method which initializes the ref count.
* Consolidate duplicate codeChris Robinson2016-08-241-39/+23
|
* Combine related members into a structChris Robinson2016-08-245-74/+75
|
* Hold updates for both listener and source updatesChris Robinson2016-08-231-1/+15
|
* Don't pass the context's distance model as the source'sChris Robinson2016-08-231-1/+6
|
* Avoid resupplying unneeded source updatesChris Robinson2016-08-232-30/+53
| | | | | 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-127-25/+60
|
* Decode directly from B-Format to HRTF instead of a cubeChris Robinson2016-08-114-40/+106
| | | | | | | | | | | | | | | | | | | | | 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.
* Set a JACK error message handler when initializing the backendChris Robinson2016-08-111-0/+10
| | | | | | | | | | | | | | JACK2 will print error messages to stderr if it fails to connect to a server. Users who don't normally use JACK but have the client lib installed will get those messages even though OpenAL Soft will continue on to find a working backend without trouble. So to avoid it, set an error message handler that'll log them as warnings. This isn't that great because there's no way to tell whether the error messages are due to the server not running, or some other problem. And it resets the callback to the default afterward even if it may have been set to something else before. JACK2, which is what needs this workaround in the first place, doesn't export the jack_error_callback pointer to properly save and restore it.
* Mix gain steps using SIMD with NeonChris Robinson2016-08-051-0/+24
|
* Modify NumUpdates for different sample rates instead of UpdateSizeChris Robinson2016-08-041-1/+1
| | | | | | | Not that this really changes anything since the CoreAudio backend doesn't honor the ALCdevice's buffer metrics, nor accurately report the device's actual metrics. But it clears up warnings from a non-multiple-of-four update size if the sample rate causes it to change.
* Constify some variablesChris Robinson2016-08-041-2/+2
|
* Look for the correct DLL for JACK on WindowsChris Robinson2016-08-031-1/+6
|
* Use the ACN and N3D map and scale lookup tables in SetChannelMapChris Robinson2016-08-021-16/+9
|
* Don't store the looping state in the voiceChris Robinson2016-07-312-3/+1
| | | | | Certain operations on the buffer queue depend on the loop state to behave properly, so it should not be deferred until the async voice update occurs.
* Rename Ambisonics to Ambisonic in a couple placesChris Robinson2016-07-311-3/+3
|
* Remove DevFmtBFormat3D, which is covered by DevFmtAmbi1Chris Robinson2016-07-3110-40/+5
|
* Add an option to specify the ambisonic output configurationChris Robinson2016-07-312-26/+46
|
* Simplify a format checkChris Robinson2016-07-301-3/+2
|
* Rename ambisonic channel config values to be shorterChris Robinson2016-07-301-3/+3
|
* Add a stand-alone upsampler for higher-order ambisonic oputputChris Robinson2016-07-305-10/+118
|
* Add a config to output first-, second-, or third-order ambisonicsChris Robinson2016-07-2910-7/+129
| | | | | | | | | 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.
* Don't try freeing the context in ReleaseThreadCtxChris Robinson2016-07-291-6/+6
| | | | | | | | | | | | Unfortunately on certain systems, the TLS callback is called in a restricted context, and isn't allowed to access certain messaging sub-systems. Such sub- systems may be used if the thread's context is freed, in turn freeing the device, which it tries to close. Ideally, the app shouldn't have tried to destroy a context while it was still current on a thread, or even leave a context current on a thread that's being destroyed,. So for now, release the context ref and print an ERR that it might be leaked.
* Combine VECTOR_RESIZE and VECTOR_RESERVEChris Robinson2016-07-268-104/+69
|
* Avoid passing NULL to a parameter that must not be NULLChris Robinson2016-07-261-2/+3
|
* Remove the last use of ALfilterState_processSingleChris Robinson2016-07-261-3/+17
|
* Remove broken autowah effect codeChris Robinson2016-07-262-278/+0
| | | | | It's been disabled forever, and I have no idea how to make it work properly. Better to just redo it when making something that works.
* Add some more restrict keywordsChris Robinson2016-07-261-1/+1
|
* Rename input_gain to b0Chris Robinson2016-07-264-10/+10
|
* Avoid more uses of ALfilterState_processSingleChris Robinson2016-07-251-9/+9
| | | | | It's a horriobly inefficient way to process multiple samples through the filter.
* Fix use of a loop varChris Robinson2016-07-251-9/+11
|
* Avoid manual loops for ALfilterState processingChris Robinson2016-07-251-25/+17
|
* Properly skip loading of already-loaded HRTF data setsChris Robinson2016-07-241-4/+24
| | | | | | | Previously, if an HRTF file was loaded it would not only skip loading it, but it would also skip adding it to the output enumeration list. Now it properly skips loading it when it's already loaded, but still adds it to the enumeration list if it's not already in it.
* 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
|
* Make a MAX_AMBI2D_COEFFS macro instead of a magic numberChris Robinson2016-07-171-4/+4
|
* Repack the ambisonic dual-band decoder matricesChris Robinson2016-07-171-94/+105
| | | | | | The decoders use a row of the HF decoder matrix followed by a row of the LF decoder matrix, for each given output channel in turn. Packing the two matrices accordingly results in less memory hopping.
* Improve the UHJ encoder's allpass processing loopsChris Robinson2016-07-141-49/+70
|
* Modify bs2b_cross_feed to do multiple samples at onceChris Robinson2016-07-132-23/+73
|
* Move the input channel array out of the DirectParams and SendParamsChris Robinson2016-07-132-75/+74
|
* Enumerate the embedded HRTF resources when availableChris Robinson2016-07-121-3/+345
|
* Add a cmake option to embed the HRTF dataChris Robinson2016-07-122-0/+9
|
* Store the voice output buffers separate from the paramsChris Robinson2016-07-112-34/+34
|
* Update comment about the source radius calculationsChris Robinson2016-07-101-9/+18
|
* Avoid standard malloc/free for Hrtf allocationChris Robinson2016-07-071-3/+4
|
* Avoid function calls to get the HRTF sample rate and IR sizeChris Robinson2016-07-076-36/+21
|