aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
Commit message (Collapse)AuthorAgeFilesLines
* Call the effect state update method after "returning" the container object.Chris Robinson2016-05-121-2/+2
|
* Avoid updating the effect state object if it's not changedChris Robinson2016-05-121-8/+7
|
* Provide (mostly) lockless updates for effect slotsChris Robinson2016-05-121-34/+69
| | | | | | | | | | | | | | | | | Similar to the listener, separate containers are provided atomically for the mixer thread to apply updates without needing to block, and a free-list is used to reuse container objects. A couple things to note. First, the lock is still used when the effect state's deviceUpdate method is called to prevent asynchronous calls to reset the device from interfering. This can be fixed by using the list lock in ALc.c instead. Secondly, old effect states aren't immediately deleted when the effect type changes (the actual type, not just its properties). This is because the mixer thread is intended to be real-time safe, and so can't be freeing anything. They are cleared away when updates reuse the container they were kept in, and they don't incur any extra processing cost, but there may be cases where the memory is kept around until the effect slot is deleted.
* Use a lockless method for updating listener and context propertiesChris Robinson2016-05-111-18/+40
| | | | | | | | | | | This uses a separate container to provide the relevant properties to the internal update method, using atomic pointer swaps. A free-list is used to avoid having too many individual containers. This allows the mixer to update the internal listener properties without requiring the lock to protect against async updates. It also allows concurrent read access to the user-facing property values, even the multi-value ones (e.g. the vectors).
* Find a valid source buffer before updating the voiceChris Robinson2016-05-091-47/+45
|
* Store more "active" listener and context properties separatelyChris Robinson2016-05-091-11/+20
| | | | | This helps ensure async listener/context property changes affect all playing sources at the same time.
* Avoid an unnecessary aluVectorChris Robinson2016-04-241-7/+7
|
* Improve radius behavior with scaling of ambisonic coefficientsChris Robinson2016-04-241-34/+23
|
* Avoid storing channel names for the dry bufferChris Robinson2016-04-161-3/+6
|
* More directly map coefficients for ambisonic mixing buffersChris Robinson2016-04-151-8/+5
| | | | | | 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.
* Avoid mixing all coefficients together when only some are usedChris Robinson2016-04-151-4/+6
|
* Avoid unnecessary loops for setting up effect slot b-format buffer mixingChris Robinson2016-04-141-12/+12
|
* Split aluInitPanning into separate functions for HRTF or UHJChris Robinson2016-04-141-3/+1
|
* Include any first-order scaling in the FOAOut coefficientsChris Robinson2016-03-251-12/+2
|
* Implement AL_EXT_STEREO_ANGLES supportChris Robinson2016-03-251-3/+8
|
* Add a cast and a couple float type fixesChris Robinson2016-03-241-2/+2
|
* Up-sample first-order content when using a higher order HQ decoderChris Robinson2016-03-231-0/+8
|
* Add a specific output for first-order sourcesChris Robinson2016-03-221-1/+3
|
* Store the effect's output buffer in the effect stateChris Robinson2016-03-171-5/+5
|
* Add a dual-band ambisonic decoderChris Robinson2016-03-151-0/+8
| | | | | | | | | | This uses a virtual B-Format buffer for mixing, and then uses a dual-band decoder for improved positional quality. This currently only works with first- order output since first-order input (from the AL_EXT_BFROMAT extension) would not sound correct when fed through a second- or third-order decoder. This also does not currently implement near-field compensation since near-field rendering effects are not implemented.
* Always mix to the real output for DirectChannelsChris Robinson2016-03-141-19/+7
|
* Use the real output's left and right channels with HRTFChris Robinson2016-03-111-12/+17
|
* Use the proper left and right channels for UHJ outputChris Robinson2016-03-101-3/+10
|
* Generalize GetChannelIdxByNameChris Robinson2016-03-101-10/+5
|
* Keep track of the real output's channel namesChris Robinson2016-03-101-27/+8
|
* Organize the dry buffer properties into a structChris Robinson2016-03-091-15/+15
|
* Track the virtual and real output buffers ecplicitlyChris Robinson2016-03-091-31/+23
|
* Add an option for pair-wise stereo panningChris Robinson2016-02-261-12/+41
|
* Use 2-channel UHJ for stereo outputChris Robinson2016-02-261-31/+30
|
* Use an 8-channel cube for HRTF's virtual format.Chris Robinson2016-02-201-7/+7
| | | | | | 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.
* Calculate HRTF stepping params right before mixingChris Robinson2016-02-141-76/+17
| | | | | 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.
* Calculate channel gain stepping just before mixingChris Robinson2016-02-141-224/+58
|
* Rename ComputeBFormatGains to ComputeFirstOrderGainsChris Robinson2016-01-311-3/+3
|
* Properly silence the LFE input channel gain on the source sendsChris Robinson2016-01-301-0/+8
|
* Fix scaling for effect sends of B-Format sourcesChris Robinson2016-01-301-1/+10
|
* Mix to multichannel for effectsChris Robinson2016-01-281-55/+235
| | | | | | This mixes to a 4-channel first-order ambisonics buffer. With ACN ordering and N3D scaling, this makes it easy to remain compatible with effects that only care about mono input since channel 0 is an unattenuated mono signal.
* Pass a pointer to the input samples array for effect processingChris Robinson2016-01-271-9/+15
|
* Separate calculating ambisonic coefficients from the panning gainsChris Robinson2016-01-251-5/+11
|
* Use doubles for the constructed listener matrixChris Robinson2015-11-111-40/+82
| | | | | | This helps the stability of transforms to local space for sources that are at or near the listener. With a single-precision matrix, even FLT_EPSILON might not be enough to detect matching positions.
* Update the bsinc tableChris Robinson2015-11-101-3/+5
| | | | Precision is increased to cover the full 32-bit float range.
* Remove a const to silence some warningsChris Robinson2015-11-061-1/+1
|
* Use more accurate floating point literalsChris Robinson2015-11-061-6/+6
|
* Implement a band-limited sinc resamplerChris Robinson2015-11-051-0/+74
| | | | | | | | This is essentially a 12-point sinc resampler, unless it's resampling to a rate higher than the output, at which point it will vary between 12 and 24 points and do anti-aliasing to avoid/reduce frequencies going over nyquist. Code provided by Christopher Fitzgerald.
* Pass in the Q parameter for setting the filter parametersChris Robinson2015-11-011-16/+24
| | | | Also better handle the peaking filter gain.
* Set the current gain immediately if the target is close enoughChris Robinson2015-10-261-2/+8
|
* Set XYZ channel gains for source sends to 0Chris Robinson2015-10-231-80/+107
| | | | | It's cleaner to just set the gains to 0 rather than to special-case B-Format in the mixer.
* Use one send gain per buffer channelChris Robinson2015-10-231-11/+16
|
* Return the new vector result from aluMatrixVectorChris Robinson2015-10-221-14/+12
|
* Remove the MIDI codeChris Robinson2015-10-201-3/+0
| | | | | | | The extension's not going anywhere, and it can't do anything fluidsynth can't. The code maintenance and bloat is not worth keeping around, and ideally the AL API would be able to facilitate MIDI-like behavior anyway (envelopes, start-at- time, etc).
* Round the calculated stepping valueChris Robinson2015-10-151-10/+2
|