aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
Commit message (Collapse)AuthorAgeFilesLines
* Move the FPU mode declarations to a separate headerChris Robinson2018-01-111-0/+1
| | | | Also don't use inheritance with FPUCtl.
* Move the CPU capability flags to a separate headerChris Robinson2018-01-111-0/+1
|
* Move the compressor/limiter declarations to their own headerChris Robinson2018-01-111-0/+1
|
* Avoid using macros to access anonymous structuresChris Robinson2018-01-111-17/+17
|
* Don't return whether the bsinc filter cuts or notChris Robinson2018-01-101-22/+8
|
* Rename the device's temp buffer storage to be more genericChris Robinson2018-01-091-2/+1
|
* Use a separate function to get the cubic valueChris Robinson2018-01-071-0/+1
|
* Remove the sinc4 tableChris Robinson2018-01-071-5/+0
|
* Replace the sinc4 resampler with cubicChris Robinson2018-01-071-2/+0
| | | | | | | Turns out the C version of the cubic resampler is just slightly faster than even the SSE3 version of the FIR4 resampler. This is likely due to not using a 64KB random-access lookup table along with unaligned loads, both offseting the gains from SSE.
* Allow storing multiple buffers in a ALbufferlistitemChris Robinson2017-12-151-1/+1
| | | | | | | | | | | | | | | This will be to allow buffer layering, multiple buffers of the same format and sample rate that are mixed together prior to resampling, filtering, and panning. This will allow composing sounds from individual components that can be swapped around on different invocations (e.g. layer SoundA and SoundB on one instance and SoundA and SoundC on a different instance for a slightly different sound, then just SoundA for a third instance, and so on). The longest buffer within the list item determines the length of the list item. More work needs to be done to fully support it, namely the ability to specity multiple buffers to layer for static and streaming sources. Also the behavior of loop points for layered static sources should be worked out. Should also consider allowing each layer to have a sample offset.
* Re-update effect slots when context properties changeChris Robinson2017-09-271-54/+41
| | | | | Also keep all free property update structs together in the context instead of per-object.
* Update the context state properties separatelyChris Robinson2017-09-271-20/+32
| | | | | | | | | | | | | The context state properties are less likely to change compared to the listener state, and future changes may prefer more infrequent updates to the context state. Note that this puts the MetersPerUnit in as a context state, even though it's handled through the listener functions. Considering the infrequency that it's updated at (generally set just once for the context's lifetime), it makes more sense to put it there than with the more frequently updated listener properties. The aforementioned future changes would also prefer MetersPerUnit to not be updated unnecessarily.
* Add an option to ignore the app's speed of sound for reverb decayChris Robinson2017-09-221-2/+10
|
* Use the app-specified speed of sound for reverb decayChris Robinson2017-09-211-1/+2
| | | | | Specifically, the initial reverb decay as determined by the source distance, and the reverb decayhf limit from air absorption.
* Pass the context to the auxiliary effect update methodChris Robinson2017-09-211-3/+3
|
* Automatically generate the bsinc table when buildingChris Robinson2017-08-281-1/+1
| | | | | This makes bsincgen a native tool like bin2h, so it can run automatically when compiling.
* Add a higher quality bsinc resampler using 24 sample pointsChris Robinson2017-08-271-9/+14
| | | | | | | This improves the transition width, allowing more of the higher frequencies remain audible. It would be preferrable to have an upper limit of 32 points instead of 48, to reduce the overall table size and the CPU cost for down- sampling.
* Rename the bsinc resampler to bsinc12Chris Robinson2017-08-251-6/+6
|
* Meters per unit can't be 0Chris Robinson2017-08-211-2/+2
|
* Properly clear the extra ChannelsPerOrder entriesChris Robinson2017-08-191-1/+1
|
* Pass the filter entry to apply to resample_fir4Chris Robinson2017-08-181-3/+2
|
* Store the sinc4 table in the filter stateChris Robinson2017-08-161-3/+11
| | | | Also rename the resampler functions to remove the unnecessary '32' token.
* Simplify bsinc filter storage in the filter stateChris Robinson2017-08-161-12/+3
| | | | | | | Rather than storing individual pointers to filter, scale delta, phase delta, and scale phase delta entries, per phase index, the new table layout makes it trivial to access the per-phase filter and delta entries given the base offset and coefficient count.
* Make the bsinc table layout more efficientChris Robinson2017-08-161-4/+4
| | | | | | | | | | | | | | | | The old layout separated filters, scale deltas, phase deltas, and scale phase deltas into separate segments that each contained a numbers of scale and phase entries, Since processing a sample needed a filter and one of each delta entry relating to a particular scale and phase, the memory needed would be spread across the whole table. And since subsequent samples would use a different phase, it would jump around the table a whole lot as well. The new layout packs the data in a way more consistent with its use. The filters, scale deltas, phase deltas, and scale phase deltas are interleaved, such that for a particular scale and phase, the filter and delta entries used are contiguous. And the phase entries for a particular scale are kept together, so the ~500 to ~1000 samples processed per source update stay within the same 3KB to 6KB area of the 70+KB table, which is much more cache friendly.
* Keep bsinc info together in a structChris Robinson2017-08-151-22/+9
|
* Avoid re-selecting the direct HRTF mix functionChris Robinson2017-08-071-15/+22
|
* Add a front-stablizer config option for surround sound modesChris Robinson2017-07-311-0/+59
| | | | | | | | | | | | This improves a stereo (front-left + front-right) sound "image" by generating a front-center channel signal. Done correctly, it helps reduce the comb effects and phase errors associated with using only two speakers to simulate center sounds. Note that it shouldn't be used if the front-center channel is already included in the positional audio mix (the dialog effect is okay). In general, it may actually be better to exclude the front-center channel from the positional audio mix and use this to generate front-center output.
* Cleanup output write functionsChris Robinson2017-07-271-32/+26
|
* Apply the output buffer offset before writing to itChris Robinson2017-07-151-24/+24
|
* Add the default auxiliary slot to the active slot arrayChris Robinson2017-07-131-16/+0
|
* Use macros to set and restore the mixer FPU modeChris Robinson2017-07-131-5/+2
|
* Store the default effect slot in the contextChris Robinson2017-07-131-18/+18
|
* Remove the fastf2u conversion functionChris Robinson2017-06-271-2/+2
|
* Clean up some loop variablesChris Robinson2017-06-251-29/+23
|
* Use the bsinc resampler for the converterChris Robinson2017-06-251-1/+1
|
* Remove an unnecessary variableChris Robinson2017-06-211-3/+2
|
* Make the dithering depth configurableChris Robinson2017-06-171-14/+4
|
* Apply dither separately from outputChris Robinson2017-06-171-98/+68
|
* Restrict ClampedDist to RefDistance for invalid distance attenuationChris Robinson2017-05-301-4/+10
|
* Fix source sends' initial HF absorption and decay calculationChris Robinson2017-05-271-21/+15
| | | | | | | | The HF absorption is applied given the source distance, as relative to the source's immediate environment, with additional absorption being applied given the room/reverb environment. This does double up the amount of absorption compared to the dry path, but it can be assumed the initial reflections travel a longer distance.
* Use normal air absorption for the sendsChris Robinson2017-05-271-1/+1
| | | | | Applies just for the normal air absorption which uses the air absorption factor, not the automated decay applied when WetGainAuto is enabled.
* Add a new compressor/limiterChris Robinson2017-05-271-93/+2
| | | | | | This is just for the output limiter right now, but in the future can be used for the compressor EFX effect. The parameters are also hardcoded, but can be made configurable after 1.18.
* Apply distance compensation separatelyChris Robinson2017-05-251-43/+66
|
* Add an option to dither 8- and 16-bit outputChris Robinson2017-05-231-45/+138
|
* Reduce the amount of variables that hold the same valueChris Robinson2017-05-211-8/+6
|
* Avoid calculating the filter coefficients multiple timesChris Robinson2017-05-211-24/+36
|
* Use a macro to specify the decay target gainChris Robinson2017-05-211-5/+5
|
* Use more correct doppler shift calculationsChris Robinson2017-05-201-11/+24
|
* Restore spec-defined cone behavior for auxiliary sendsChris Robinson2017-05-201-26/+23
|
* Apply more proper air absorption to the wet pathChris Robinson2017-05-191-21/+53
| | | | | | | | This properly accounts for the room rolloff factor for normal air absorption (which makes it none by default, like distance attenuation), and uses the reverb's decay time, decay hf ratio, decay hf limit, and room air absorption properties to calculate an initial hf decay with the WetGainAuto flag. This mirrors the behavior of the initial distance decay.