aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alListener.c
Commit message (Collapse)AuthorAgeFilesLines
* Convert alListener.c to C++Chris Robinson2018-11-161-502/+0
|
* Avoid using ATOMIC_FLAGChris Robinson2018-11-131-2/+2
| | | | | Although it cant potentially be better than a regular atomic, it presents compatibility issues when non-C11 atomics are mixed with C++
* Use a plain mutex for the property lockChris Robinson2018-03-031-24/+24
|
* Add the printf-format attribute to alSetErrorChris Robinson2018-01-251-19/+19
|
* Construct error messages using parameterized valuesChris Robinson2018-01-251-7/+6
|
* Provide messages for the remaining AL errorsChris Robinson2018-01-241-58/+49
|
* Re-update effect slots when context properties changeChris Robinson2017-09-271-3/+3
| | | | | Also keep all free property update structs together in the context instead of per-object.
* Don't update context and listener props unnecessarilyChris Robinson2017-09-271-26/+34
|
* Update the context state properties separatelyChris Robinson2017-09-271-12/+6
| | | | | | | | | | | | | The context state properties are less likely to change compared to the listener state, and future changes may prefer more infrequent updates to the context state. Note that this puts the MetersPerUnit in as a context state, even though it's handled through the listener functions. Considering the infrequency that it's updated at (generally set just once for the context's lifetime), it makes more sense to put it there than with the more frequently updated listener properties. The aforementioned future changes would also prefer MetersPerUnit to not be updated unnecessarily.
* 0 meters per unit is invalidChris Robinson2017-08-211-1/+1
|
* Use separate atomic macros for pointersChris Robinson2017-04-141-4/+3
|
* Remove unnecessary atomic membersChris Robinson2017-03-081-24/+24
|
* Avoid duplicating code using a macroChris Robinson2016-12-211-5/+1
|
* Use separate macros for atomics that don't take a memory orderChris Robinson2016-12-201-2/+2
|
* Stop using almemory_order_consumeChris Robinson2016-11-171-1/+1
|
* Don't pass the context's distance model as the source'sChris Robinson2016-08-231-0/+3
|
* Avoid resupplying unneeded source updatesChris Robinson2016-08-231-18/+0
| | | | | 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.
* Avoid redundantly storing distance model settingsChris Robinson2016-05-171-4/+0
|
* Provide asynchronous property updates for sourcesChris Robinson2016-05-141-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | 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/+4
|
* Use a lockless method for updating listener and context propertiesChris Robinson2016-05-111-42/+106
| | | | | | | | | | | 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).
* Use aluVector in some more placesChris Robinson2014-12-161-18/+14
|
* Update COPYING to the latest ↵François Cami2014-08-181-2/+2
| | | | https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt to fix the FSF' address Fix the FSF' address in the source
* Explicitly pass the address of atomics and parameters that can be modifiedChris Robinson2014-07-261-5/+5
|
* Add macros for generic atomic functionalityChris Robinson2014-07-221-5/+5
|
* Remove al_try from alListener.cChris Robinson2013-10-071-291/+267
|
* Use an UNUSED macro instead of void-tagging unused parametersChris Robinson2013-10-071-3/+1
|
* Build the listener matrix separatelyChris Robinson2012-10-091-30/+1
|
* Store a pointer to the listener in the contextChris Robinson2012-10-091-56/+56
|
* Switch alListener.c to the new error handling scheme, and get rid of more ↵Chris Robinson2012-04-231-210/+198
| | | | hungarian notation
* Calculate the listener matrix when a new orientation is specifiedChris Robinson2011-10-301-1/+31
| | | | | This is so the matrix isn't derived each time a source is updated, and it will make supporting user-defined matrices easier.
* Silence some MSVC precision warningsChris Robinson2011-09-221-1/+1
|
* Hold the context lock only as needed when handling the listenerChris Robinson2011-08-311-118/+136
|
* Make sure some listener property values are finiteChris Robinson2011-07-201-18/+35
|
* Avoid some alListenerfv calls while under the context lockChris Robinson2011-07-111-9/+12
|
* Use a flag to signifiy that all sources need updatingChris Robinson2011-07-111-42/+5
|
* Rename Suspend/ProcessContext since they are locking a mutexChris Robinson2011-06-301-24/+24
|
* Avoid calling some AL functions from under the context lockChris Robinson2011-06-161-41/+39
| | | | | | | There are still some more occurances to clear out (deletion in gen error, effects, some filters), which shall be coming up. There is a possibility for a deadlock between the listlock and the global/context lock, if another attempt to get the listlock is made while under the context lock.
* Use a map to store sources and buffersChris Robinson2010-05-011-9/+9
| | | | And do a lookup using a binary search instead of linear
* Don't use deprecated macrosChris Robinson2010-03-191-12/+12
|
* Pass the context to alSetErrorChris Robinson2010-03-161-22/+22
|
* Rename some struct members for consistencyChris Robinson2010-03-161-3/+3
|
* Update source parameters only when they need changingChris Robinson2009-11-251-18/+49
|
* More modifications and fixes for context checksChris Robinson2009-08-161-128/+68
|
* Use a function to retrieve the current context in an already-locked stateChris Robinson2009-08-161-36/+12
| | | | | This should help prevent race-conditions with a context being destroyed between breing retrieved and locked
* Add missing config.h includesChris Robinson2008-01-161-0/+2
|
* Add AL_METERS_PER_UNIT listener propertyChris Robinson2007-12-171-0/+22
|
* Initial importChris Robinson2007-11-131-0/+513