aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
Commit message (Collapse)AuthorAgeFilesLines
* Dynamically allocate the device's HRTF stateChris Robinson2017-03-101-13/+14
|
* Implement NFC filters for Ambisonic renderingChris Robinson2017-03-102-1/+15
| | | | | | | | | | | | | | 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-083-62/+62
|
* Store the channel count and sample size in the voiceChris Robinson2017-03-071-4/+7
|
* Remove an unused functionChris Robinson2017-03-071-6/+0
|
* Make the voice's source pointer atomicChris Robinson2017-03-051-1/+1
|
* Add a boolean to specify if a voice should be playingChris Robinson2017-03-021-3/+5
|
* 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.
* 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-271-11/+13
| | | | | | | | | | | | | | 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-251-1/+1
|
* Improve handling of source state readsChris Robinson2017-02-241-1/+1
| | | | | | | 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.
* 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-212-2/+2
|
* Make the voices' Send[] array dynamically sizedChris Robinson2017-02-212-2/+2
| | | | | 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
|
* Remove the sinc8 resampler optionChris Robinson2017-02-191-12/+2
| | | | | Perf shows less than 1 percent CPU difference from the higher quality bsinc resampler, but uses almost twice as much memory (a 128KB lookup table).
* Reorganize ALvoice membersChris Robinson2017-02-151-7/+6
| | | | | This places the Send[] array at the end of the struct, making it easier to handle dynamically.
* Make ALsourceProps' Send array dynamically sizedChris Robinson2017-02-142-4/+13
| | | | | | ALsourceProps' Send[] array is placed at the end of the struct, and given an indeterminate size. Extra space is allocated at the end of each struct given the number of auxiliary sends set for the device.
* Fix build with non-C11 atomicsChris Robinson2017-02-131-1/+1
|
* Make the source state atomicChris Robinson2017-02-131-1/+8
| | | | | Since it's modified by the mixer when playback is ended, a plain struct member isn't safe.
* Put BsincState in a generic unionChris Robinson2017-02-132-2/+6
|
* Fix more uses of unsigned sizes and offsetsChris Robinson2017-02-101-1/+1
|
* Remove a couple context lock wrapper functionsChris Robinson2017-02-071-6/+0
|
* Remove __android_log_print calls for TRACEREFChris Robinson2017-01-271-1/+0
| | | | | TRACEREFs aren't normally important, and for as often as it happens, the added function calls are wasteful even if they end up doing nothing.
* Also log to __android_log_print on AndroidChris Robinson2017-01-261-0/+11
|
* Move the B-Format HRTF virtual speaker stuff to InitHrtfPanningChris Robinson2017-01-181-12/+20
| | | | | This keeps the decoder matrices and coefficient mapping together for if it changes in the future.
* Replace some ALvoid with voidChris Robinson2017-01-181-3/+3
|
* Use ALsizei in more placesChris Robinson2017-01-185-29/+29
|
* Pass the left and right buffers to the hrtf mixers directlyChris Robinson2017-01-171-5/+5
|
* Use ALsizei and ALint for sizes and offsets with resamplers and filtersChris Robinson2017-01-162-3/+4
|
* Use ALsizei for sizes and offsets with the mixerChris Robinson2017-01-162-18/+18
| | | | | | Unsigned 32-bit offsets actually have some potential overhead on 64-bit targets for pointer/array accesses due to rules on integer wrapping. No idea how much impact it has in practice, but it's nice to be correct about it.
* Use second-order ambisonics for basic HRTF renderingChris Robinson2017-01-151-2/+2
| | | | | | This should improve positional quality for relatively low cost. Full HRTF rendering still only uses first-order since the only use of the dry buffer there is for first-order content (B-Format buffers, effects).
* Reorder filter coefficientsChris Robinson2016-12-211-1/+1
|
* Convert the SndIO backend to the updated APIChris Robinson2016-12-211-3/+0
|
* Only send source updates for sources that have updatedChris Robinson2016-11-231-0/+2
|
* Clean up finding a source's voiceChris Robinson2016-11-221-1/+1
|
* Workaround some systems having an ECHO macroChris Robinson2016-10-301-10/+10
|
* Add some more 'restrict' keywordsChris Robinson2016-10-061-1/+1
|
* Remove an unused structChris Robinson2016-10-051-6/+0
|
* Pass current and target gains directly for mixingChris Robinson2016-10-051-2/+3
|
* Make some pointer-to-array parameters constChris Robinson2016-10-042-2/+45
|
* Finalize AL_SOFT_gain_clamp_exChris Robinson2016-10-031-5/+0
|
* Add a volume-adjust config option to adjust the source output volumeChris Robinson2016-09-241-0/+2
| | | | | | | | | Designed for apps that either don't change the listener's AL_GAIN, or don't allow the listener's AL_GAIN to go above 1. This allows the volume to still be increased further than such apps may allow, if users find it too quiet. Be aware that increasing this can easily cause clipping. The gain limit reported by AL_GAIN_LIMIT_SOFT is also affected by this.
* Remove some more unnecessary volatilesChris Robinson2016-09-241-5/+5
|