aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
Commit message (Collapse)AuthorAgeFilesLines
* Convert the CoreAudio backend to the updated backend APIChris Robinson2017-04-091-3/+0
|
* Handle the source offset fraction as an ALsizeiChris Robinson2017-04-082-9/+11
|
* Pre-compute the sinc4 resampler coefficient tableChris Robinson2017-04-081-4/+3
|
* Reference count HRTFs and unload them when unusedChris Robinson2017-04-061-1/+1
|
* Load HRTF files as neededChris Robinson2017-04-051-1/+1
| | | | | Currently only applies to external files, rather than embedded datasets. Also, HRTFs aren't unloaded after being loaded, until library shutdown.
* Store the loaded hrtf entry container in the enumerated hrtf entryChris Robinson2017-04-051-5/+6
|
* Make sure the mix is done after setting the looping propertyChris Robinson2017-04-021-0/+9
|
* Remove a couple more uses of BYTE3Chris Robinson2017-03-311-2/+0
|
* Convert float samples to integer using a power-of-2 multipleChris Robinson2017-03-311-6/+8
|
* Remove the (u)byte3 sample formatsChris Robinson2017-03-313-117/+1
| | | | | They're not accessible since the removal of the buffer_samples extension, and were kind of clunky to work with as 24-bit packed values.
* Convert integer samples to float using a power-of-2 divisorChris Robinson2017-03-311-7/+7
| | | | | | | This should cut down on unnecessary quantization noise (however minor) for 8- and 16-bit samples. Unfortunately a power-of-2 multiple can't be used as easily for converting float samples to integer, due to integer types having a non- power-of-2 maximum amplitude (it'd require more per-sample clamping).
* Use an array of pointers for effects instead of a linked listChris Robinson2017-03-273-46/+77
|
* Fix handling of the PropsClean flagsChris Robinson2017-03-232-2/+2
|
* Use an atomic flag to mark auxiliary effect slot updatesChris Robinson2017-03-232-6/+6
|
* Add some comments for ALsource functionsChris Robinson2017-03-231-1/+13
|
* Use an atomic flag to test if a source needs to updateChris Robinson2017-03-202-8/+8
|
* Break up a function and move the code to where it's calledChris Robinson2017-03-191-176/+169
|
* Don't defer source state or offset changesChris Robinson2017-03-194-53/+19
|
* Avoid doing sequential load for the source stateChris Robinson2017-03-121-10/+8
|
* Store the HRIR coeff pointer and delays directly in MixHrtfParamsChris Robinson2017-03-122-4/+6
|
* Rework HRTF coefficient fadingChris Robinson2017-03-112-11/+9
| | | | | | | | | | | | | | | This improves fading between HRIRs as sources pan around. In particular, it improves the issue with individual coefficients having various rounding errors in the stepping values, as well as issues with interpolating delay values. It does this by doing two mixing passes for each source. First using the last coefficients that fade to silence, and then again using the new coefficients that fade from silence. When added together, it creates a linear fade from one to the other. Additionally, the gain is applied separately so the individual coefficients don't step with rounding errors. Although this does increase CPU cost since it's doing two mixes per source, each mix is a bit cheaper now since the stepping is simplified to a single gain value, and the overall quality is improved.
* Make the voice's 'moving' state a bitflagChris Robinson2017-03-112-7/+5
|
* Allocate as many channels for DirectHrtfState as neededChris Robinson2017-03-111-2/+4
|
* Dynamically allocate the device's HRTF stateChris Robinson2017-03-101-13/+14
|
* Implement NFC filters for Ambisonic renderingChris Robinson2017-03-103-1/+27
| | | | | | | | | | | | | | NFC filters currently only work when rendering to ambisonic buffers, which includes HQ rendering and ambisonic output. There are two new config options: 'decoder/nfc' (default on) enables or disables use of NFC filters globally, and 'decoder/nfc-ref-delay' (default 0) specifies the reference delay parameter for NFC-HOA rendering with ambisonic output (a value of 0 disables NFC). Currently, NFC filters rely on having an appropriate value set for AL_METERS_PER_UNIT to get the correct scaling. HQ rendering uses the averaged speaker distances as a control/reference, and currently doesn't correct for individual speaker distances (if the speakers are all equidistant, this is fine, otherwise per-speaker correction should be done as well).
* Move ALvoice declaration to alu.hChris Robinson2017-03-092-55/+55
|
* Remove unnecessary atomic membersChris Robinson2017-03-086-141/+135
|
* Remove an unnecessary variableChris Robinson2017-03-071-3/+2
|
* Check that a source is actually playing before setting pausedChris Robinson2017-03-071-28/+35
| | | | | Also slightly refactor setting playing state when the device is disconnected or there's no buffers to play.
* Store the channel count and sample size in the voiceChris Robinson2017-03-072-15/+11
|
* Don't modify the source state in the mixerChris Robinson2017-03-071-7/+25
|
* Remove an unused functionChris Robinson2017-03-072-7/+0
|
* Make the voice's source pointer atomicChris Robinson2017-03-052-8/+10
|
* Add a boolean to specify if a voice should be playingChris Robinson2017-03-022-18/+44
|
* Dynamically allocate the channel delay buffersChris Robinson2017-02-281-2/+2
|
* Remove unused function declarationsChris Robinson2017-02-281-3/+0
|
* Start a ALC_SOFT_loopback2 extensionChris Robinson2017-02-281-5/+28
| | | | | | | | | | | | | | | | | | | | | | This extends the base ALC_SOFT_loopback extension with support for B-Format. When ALC_FORMAT_CHANNELS_SOFT is set to ALC_BFORMAT3D_SOFT, then additional attributes must be specified. ALC_AMBISONIC_LAYOUT_SOFT must be set to ALC_ACN_SOFT or ALC_FUMA_SOFT for the desired channel layout, ALC_AMBISONIC_SCALING_SOFT must be set to ALC_N3D_SOFT, ALC_SN3D_SOFT, or ALC_FUMA_SOFT for the desired channel scaling/normalization scheme, and ALC_AMBISONIC_ORDER_SOFT must be set to an integer value greater than 0 for the ambisonic order (maximum allowed is implementation-dependent). Note that the number of channels required for ALC_BFORMAT3D_SOFT is dependent on the ambisonic order. The number of channels can be calculated by: num_channels = (order+1) * (order+1); /* or pow(order+1, 2); */ In addition, a new alcIsAmbisonicFormatSupportedSOFT function allows apps to determine which layout/scaling/order combinations are supported by the loopback device. For example, alcIsAmbisonicFormatSupported(device, ALC_ACN_SOFT, ALC_SN3D_SOFT, 2) will check if 2nd order AmbiX (ACN layout and SN3D scaling) rendering is supported for ALC_BFORMAT3D_SOFT output.
* Print WARNs when a device or context error is generatedChris Robinson2017-02-271-0/+5
|
* Avoid standard malloc for buffer queue entriesChris Robinson2017-02-271-7/+7
|
* Use separate enums for the ambisonic channel order and normalizationChris Robinson2017-02-271-6/+14
|
* Move the current buffer queue entry and play position to the voiceChris Robinson2017-02-272-102/+113
| | | | | | | | | | | | | | This has a couple behavioral changes. First and biggest is that querying AL_BUFFERS_PROCESSED from a source will always return all buffers processed when in an AL_STOPPED state. Previously all buffers would be set as processed when first becoming stopped, but newly queued buffers would *not* be indicated as processed. That old behavior was not compliant with the spec, which unequivocally states "On a source in the AL_STOPPED state, all buffers are processed." Secondly, querying AL_BUFFER on an AL_STREAMING source will now always return 0. Previously it would return the current "active" buffer in the queue, but there's no basis for that in the spec.
* Ensure a non-playing or -paused source does not use a mixing voiceChris Robinson2017-02-252-44/+56
|
* Improve handling of source state readsChris Robinson2017-02-242-72/+89
| | | | | | | This avoids using seq_cst for loading the source state when either inside the mixer, or otherwise protected from inconsistencies with async updates. It also fixes potential race conditions with getting the source offset just as a source stops.
* Remove CalcXYZCoeffs and inline CalcAngleCoeffsChris Robinson2017-02-231-13/+9
|
* Alter how panpot/pair-wise panning worksChris Robinson2017-02-231-0/+10
| | | | | | | | | | | | | | | | | | | This change allows pair-wise panning to mostly go through the normal ambisonic panning methods, with one special-case. First, a term is added to the stereo decoder matrix's X coefficient so that a centered sound is reduced by -3dB on each output channel. Panning in front creates a similar gain response to the typical L = sqrt(1-pan) R = sqrt(pan) for pan = [0,1]. Panning behind the listener can reduce (up to) an additional -10dB, creating a audible difference between front and back sounds as if simulating head obstruction. Secondly, as a special-case, the source positions are warped when calculating the ambisonic coefficients so that full left panning is reached at -30 degrees and full right at +30 degrees. This is to retain the expected 60-degree stereo width. This warping does not apply to B-Format buffer input, although it otherwise has the same gain responses.
* Limit filter gains to -24dBChris Robinson2017-02-221-1/+1
|
* Increase the default effect slot and send countChris Robinson2017-02-211-1/+2
| | | | | | | | | | The default number of auxiliary effect slots is now 64. This can still be raised by the config file without a hard maximum, but incurs processing cost for each effect slot generated by the app. The default number of source sends is now actually 2, as per the EFX docs. However, it can be raised up to 16 via ALC_MAX_AUXILIARY_SENDS attribute requests, rather than the previous 4.
* Dynamically allocate the ALsource Send[] arrayChris Robinson2017-02-213-24/+35
|
* Make the voices' Send[] array dynamically sizedChris Robinson2017-02-213-10/+10
| | | | | The voices are still all allocated in one chunk to avoid memory fragmentation. But they're accessed as an array of pointers since the size isn't static.
* Apply distance compensation when writing to the outputChris Robinson2017-02-191-0/+12
|