aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Call ALfilterState_processC directlyChris Robinson2016-09-121-3/+2
| | | | | | It's the only implementation currently, so there's no point to having it stored as a function pointer in the filter struct. Even if there were SIMD versions, it'd be a global selection, not per-instance.
* Mark a global variable declaration as externChris Robinson2016-09-111-1/+1
|
* Use unsigned int shifts for device flagsChris Robinson2016-09-071-5/+5
|
* Make the SelectMixer function sharableChris Robinson2016-09-061-0/+2
|
* Remove use of DECL_CONSTChris Robinson2016-09-062-10/+8
| | | | | No idea if it was really gaining us anything, but removing it fixes a crash I was getting with libs built with Clang.
* Use a predefined identity matrixChris Robinson2016-09-051-0/+1
|
* Rename MatrixMixerFunc to RowMixerFuncChris Robinson2016-09-021-3/+3
|
* Add a query for the maximum source gain limitChris Robinson2016-08-281-0/+5
|
* Clamp the maximum mixing gain boost to 16Chris Robinson2016-08-271-0/+2
| | | | | | The combined source and listener gains now can't exceed a multiplier of 16 (~24dB). This is to avoid mixes getting out of control with large volume boosts, which reduces the effective precision given by floating-point.
* Allow sources to play while alcSuspendContext is in effectChris Robinson2016-08-261-1/+7
| | | | | | | | | | | | | | This appears to be how Creative's Windows drivers handle it, and is necessary for at least the Windows version of UT2k4 (otherwise it tries to play a source while suspended, checks and sees it's stopped, then kills it before it's given a chance to start playing). Consequently, the internal properties it gets mixed with are determined by what the source properties are at the time of the play call, and the listener properties at the time of the suspend call. This does not change alDeferUpdatesSOFT, which will still hold the play state change until alProcessUpdatesSOFT.
* Properly defer effect slot changesChris Robinson2016-08-251-0/+3
| | | | | | | | Note that this now also causes all playing sources to update when an effect slot is updated. This is a bit wasteful, as it should only need to re-update sources that are using the effect slot (and only when a relevant property is changed), but it's good enough. Especially with deferring since all playing sources are going to get updated on the process call anyway.