aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add a ref count to ALeffectStateChris Robinson2016-08-252-0/+8
| | | | | This is mostly just reorganizing the effects to call the Construct method which initializes the ref count.
* Combine related members into a structChris Robinson2016-08-241-10/+12
|
* Don't pass the context's distance model as the source'sChris Robinson2016-08-231-0/+5
|
* Avoid resupplying unneeded source updatesChris Robinson2016-08-231-34/+37
| | | | | The source's voice holds a copy of the last properties it received, so listener updates can make sources recalculate internal properties from that stored copy.
* Use a more specialized mixer function for B-Format to HRTFChris Robinson2016-08-122-2/+6
|
* Decode directly from B-Format to HRTF instead of a cubeChris Robinson2016-08-111-2/+3
| | | | | | | | | | | | | | | | | | | | | Last time this attempted to average the HRIRs according to their contribution to a given B-Format channel as if they were loudspeakers, as well as averaging the HRIR delays. The latter part resulted in the loss of the ITD (inter-aural time delay), a key component of HRTF. This time, the HRIRs are averaged similar to above, except instead of averaging the delays, they're applied to the resulting coefficients (for example, a delay of 8 would apply the HRIR starting at the 8th sample of the target HRIR). This does roughly double the IR length, as the largest delay is about 35 samples while the filter is normally 32 samples. However, this is still smaller the original data set IR (which was 256 samples), it also only needs to be applied to 4 channels for first-order ambisonics, rather than the 8-channel cube. So it's doing twice as much work per sample, but only working on half the number of samples. Additionally, since the resulting HRIRs no longer rely on an extra delay line, a more efficient HRTF mixing function can be made that doesn't use one. Such a function can also avoid the per-sample stepping parameters the original uses.
* Add 'restrict' to another parameterChris Robinson2016-08-031-1/+1
|
* Don't store the looping state in the voiceChris Robinson2016-07-311-4/+2
| | | | | Certain operations on the buffer queue depend on the loop state to behave properly, so it should not be deferred until the async voice update occurs.
* Remove DevFmtBFormat3D, which is covered by DevFmtAmbi1Chris Robinson2016-07-311-1/+1
|
* Add an option to specify the ambisonic output configurationChris Robinson2016-07-311-0/+12
|
* Add a stand-alone upsampler for higher-order ambisonic oputputChris Robinson2016-07-301-1/+4
|
* Add a config to output first-, second-, or third-order ambisonicsChris Robinson2016-07-291-0/+3
| | | | | | | | | Currently incomplete, as second- and third-order output will not correctly handle B-Format input buffers. A standalone up-sampler will be needed, similar to the high-quality decoder. Also, output is ACN ordering with SN3D normalization. A config option will eventually be provided to change this if desired.
* Remove the last use of ALfilterState_processSingleChris Robinson2016-07-261-17/+0
|
* Remove broken autowah effect codeChris Robinson2016-07-262-10/+0
| | | | | It's been disabled forever, and I have no idea how to make it work properly. Better to just redo it when making something that works.
* Add some more restrict keywordsChris Robinson2016-07-261-2/+2
|
* Rename input_gain to b0Chris Robinson2016-07-261-3/+2
|
* Make a MAX_AMBI2D_COEFFS macro instead of a magic numberChris Robinson2016-07-171-1/+8
|
* Modify bs2b_cross_feed to do multiple samples at onceChris Robinson2016-07-131-36/+5
|
* Move the input channel array out of the DirectParams and SendParamsChris Robinson2016-07-132-15/+13
|
* Store the voice output buffers separate from the paramsChris Robinson2016-07-112-6/+10
|
* Reorder some source fieldsChris Robinson2016-07-071-5/+5
|
* Avoid using memcpy to copy a single structChris Robinson2016-07-061-14/+12
|
* Remove a slightly outdated commentChris Robinson2016-07-061-1/+0
|
* Remove the VirtOut buffer aliasChris Robinson2016-07-051-6/+3
|
* Rename MaxNoOfSources for consistencyChris Robinson2016-06-081-1/+1
|
* Only define 8 HRTF filter states and params for the deviceChris Robinson2016-06-041-2/+2
| | | | | It will only be used with a cube channel setup, so there's no need to have one for every possible output channel.
* Add property queries to get the device latency with the clockChris Robinson2016-06-031-0/+2
|
* Remove some unnecessary volatile keywordsChris Robinson2016-06-032-33/+33
|
* Make a function staticChris Robinson2016-06-011-1/+0
|
* Use a macro to specify the ambisonic periphonic channel maskChris Robinson2016-06-011-1/+10
|
* Use SSE for applying the HQ B-Format decoder matricesChris Robinson2016-05-311-0/+3
|
* Hold the effectslot map lock while handling itChris Robinson2016-05-291-2/+11
|
* Use a linked list for active effect slotsChris Robinson2016-05-292-1/+3
|
* Use a specific lock for the backend's stop/reset/play callsChris Robinson2016-05-271-0/+2
| | | | | This helps protect against the device changing unexpectedly from multiple threads, instead of using the global list/library lock.
* Avoid using realloc in a number of placesChris Robinson2016-05-211-0/+1
|
* Make the source position calues atomicChris Robinson2016-05-191-2/+2
|
* Avoid redundantly storing distance model settingsChris Robinson2016-05-172-7/+1
|
* Use floats for the listener transformsChris Robinson2016-05-162-26/+1
|
* Don't store the source's update method with the voiceChris Robinson2016-05-162-6/+0
|
* Avoid separate updates to sources that should apply togetherChris Robinson2016-05-152-2/+6
|
* Avoid using a flag to specify if the effect state needs to be updatedChris Robinson2016-05-151-3/+1
| | | | | This fixes a potential missed state change if an update with a new state got replaced with one that doesn't.
* Provide asynchronous property updates for sourcesChris Robinson2016-05-143-26/+85
| | | | | | | | | | | | | | | | | | | | | | | | | This necessitates a change in how source updates are handled. Rather than just being able to update sources when a dependent object state is changed (e.g. a listener gain change), now all source updates must be proactively provided. Consequently, apps that do not utilize any deferring (AL_SOFT_defer_updates or alcSuspendContext/alcProcessContext) may utilize more CPU since it'll be filling out more update containers for the mixer thread to use. The upside is that there's less blocking between the app's calling thread and the mixer thread, particularly for vectors and other multi-value properties (filters and sends). Deferring behavior when used is also improved, since updates that shouldn't be applied yet are simply not provided. And when they are provided, the mixer doesn't have to ignore them, meaning the actual deferring of a context doesn't have to synchrnously force an update -- the process call will send any pending updates, which the mixer will apply even if another deferral occurs before the mixer runs, because it'll still be there waiting on the next mixer invocation. There is one slight bug introduced by this commit. When a listener change is made, or changes to multiple sources while updates are being deferred, it is possible for the mixer to run while the sources are prepping their updates, causing some of the source updates to be seen before the other. This will be fixed in short order.
* Store the remaining context properties with the listener propertiesChris Robinson2016-05-131-0/+6
|
* Get rid of an unnecessary copy of ALeffectPropsChris Robinson2016-05-131-3/+2
|
* Hold the effect and filter maps while handling effects and filtersChris Robinson2016-05-122-4/+22
|
* Avoid updating the effect state object if it's not changedChris Robinson2016-05-121-1/+3
|
* Provide (mostly) lockless updates for effect slotsChris Robinson2016-05-121-5/+39
| | | | | | | | | | | | | | | | | 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-112-6/+31
| | | | | | | | | | | 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).