aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace the sinc4 resampler with cubicChris Robinson2018-01-071-2/+2
| | | | | | | Turns out the C version of the cubic resampler is just slightly faster than even the SSE3 version of the FIR4 resampler. This is likely due to not using a 64KB random-access lookup table along with unaligned loads, both offseting the gains from SSE.
* Add an "un-exposed" method to get the library versionChris Robinson2017-10-161-0/+10
| | | | | | | This reports the same ALSOFT version as alGetString(AL_VERSION), but doesn't require a current context (which requires a ALCdevice) to call. Do *NOT* use this version to determine feature support, use the standard interfaces. If you think you need to use this, you probably don't, and shouldn't.
* 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-14/+14
|
* Update the context state properties separatelyChris Robinson2017-09-271-6/+45
| | | | | | | | | | | | | 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.
* Rename resampler labelsChris Robinson2017-08-271-3/+3
|
* Add a higher quality bsinc resampler using 24 sample pointsChris Robinson2017-08-271-0/+2
| | | | | | | This improves the transition width, allowing more of the higher frequencies remain audible. It would be preferrable to have an upper limit of 32 points instead of 48, to reduce the overall table size and the CPU cost for down- sampling.
* Rename the bsinc resampler to bsinc12Chris Robinson2017-08-251-2/+2
|
* Rename Zero-Order Hold to NearestChris Robinson2017-05-031-1/+1
| | | | | | A bit of a misnomer now since "Nearest" implies rounding (i.e. when the sample offset is >= .5, it should pick the next sample being closer in time), but that adds unnecessary complications.
* Add a method to enumerate resamplersChris Robinson2017-04-211-0/+90
|
* Don't defer source state or offset changesChris Robinson2017-03-191-6/+6
|
* Trace the commit ID and branch the library was built fromChris Robinson2016-12-211-0/+2
|
* Add a volume-adjust config option to adjust the source output volumeChris Robinson2016-09-241-5/+5
| | | | | | | | | 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.
* Add a query for the maximum source gain limitChris Robinson2016-08-281-0/+26
|
* Allow sources to play while alcSuspendContext is in effectChris Robinson2016-08-261-6/+11
| | | | | | | | | | | | | | 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.
* Don't pass the context's distance model as the source'sChris Robinson2016-08-231-3/+3
|
* Avoid resupplying unneeded source updatesChris Robinson2016-08-231-9/+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-9/+0
|
* Provide asynchronous property updates for sourcesChris Robinson2016-05-141-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+4
|
* Use a lockless method for updating listener and context propertiesChris Robinson2016-05-111-6/+21
| | | | | | | | | | | 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).
* Remove the MIDI codeChris Robinson2015-10-201-96/+0
| | | | | | | The extension's not going anywhere, and it can't do anything fluidsynth can't. The code maintenance and bloat is not worth keeping around, and ideally the AL API would be able to facilitate MIDI-like behavior anyway (envelopes, start-at- time, etc).
* Avoid the ALCdevice_Lock/Unlock wrapper in some placesChris Robinson2014-11-011-2/+3
|
* Make alcSuspendContext and alcProcessContext batch updatesChris Robinson2014-10-121-72/+2
| | | | | | | | | | This behavior better matches Creative's hardware drivers and Rapture3D's OpenAL driver. A compatibility environment variable is provided to restore the old no-op behavior for any app that behaves badly from this change (set __ALSOFT_SUSPEND_CONTEXT to "ignore"). If too many apps have a problem with this, the default behavior may need to be changed to ignore, with the env var providing an option to defer/batch instead.
* Protect alProcessUpdatesSOFT with a lockChris Robinson2014-09-031-2/+2
|
* Rename activesource to voiceChris Robinson2014-08-211-8/+8
|
* Use an array of objects for active sources instead of pointersChris Robinson2014-08-211-4/+4
|
* Use a NULL source for inactive activesourcesChris Robinson2014-08-211-6/+4
| | | | Also only access the activesource's source field once per update.
* 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-9/+9
|
* Use generic atomics in more placesChris Robinson2014-07-221-1/+1
|
* Add macros for generic atomic functionalityChris Robinson2014-07-221-8/+8
|
* Use a RWLock to help protect the source's buffer queueChris Robinson2014-05-101-0/+4
| | | | | In some instances this allows to to remove the device/mixer lock, or reduce how long it's held.
* Add a generic vector interface and use it for the active effect slotsChris Robinson2014-03-211-2/+2
|
* Store some source mixing parameters in the active source structChris Robinson2014-03-191-2/+2
|
* Use a separate struct for tracking active sourcesChris Robinson2014-03-181-6/+10
|
* Add a method to get the current MIDI stateChris Robinson2014-01-121-0/+26
|
* Add a method to set and get soundfontsChris Robinson2013-12-271-4/+48
| | | | | The main purpose of this is to select soundfonts for playback, eventually, instead of the existing method that takes a filename.
* Move the base MidiSynth to a separate fileChris Robinson2013-12-171-1/+2
|
* Add methods to set and get the MIDI gainChris Robinson2013-11-301-0/+12
|
* Start a MIDI interface extensionChris Robinson2013-11-281-0/+84
|
* Rename VCALL and VCALL0 to V and V0Chris Robinson2013-11-021-1/+1
|
* Modify how VCALL is handledChris Robinson2013-10-281-1/+1
| | | | | | | | | | | Now instead of specifying the arguments as a third argument to the macro, like VCALL(object,function,(arg1, arg2)); they are specified separately after the macro, like VCALL(object,function)(arg1, arg2); Also, VCALL_NOARGS has been removed in favor of VCALL0, which behaves like above but expects an empty argument list (a separate macro is needed to work around preprocessor limitations).
* Remove al_try from alState.cChris Robinson2013-10-071-326/+283
|
* Fix up the naming convention of effect methodsChris Robinson2013-05-291-1/+1
|
* Use generic VCALL[_NOARGS] macros instead of type-specific wrappersChris Robinson2013-05-271-1/+1
|
* Simplify al_try codeChris Robinson2013-03-241-5/+1
|
* Use a struct to store the FPU modeChris Robinson2012-09-161-3/+3
|
* Remove an unused headerChris Robinson2012-09-141-1/+1
|
* Change alState.c to the new error handlingChris Robinson2012-04-241-221/+233
|