aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alSource.h
Commit message (Collapse)AuthorAgeFilesLines
* Allow storing multiple buffers in a ALbufferlistitemChris Robinson2017-12-151-1/+2
| | | | | | | | | | | | | | | This will be to allow buffer layering, multiple buffers of the same format and sample rate that are mixed together prior to resampling, filtering, and panning. This will allow composing sounds from individual components that can be swapped around on different invocations (e.g. layer SoundA and SoundB on one instance and SoundA and SoundC on a different instance for a slightly different sound, then just SoundA for a third instance, and so on). The longest buffer within the list item determines the length of the list item. More work needs to be done to fully support it, namely the ability to specity multiple buffers to layer for static and streaming sources. Also the behavior of loop points for layered static sources should be worked out. Should also consider allowing each layer to have a sample offset.
* Rename RollOff to RolloffChris Robinson2017-05-051-1/+1
|
* Add a property to force source spatialization on or offChris Robinson2017-05-041-0/+1
|
* Store the resampler as part of the sourceChris Robinson2017-04-211-0/+1
|
* Make the buffer list next pointer atomicChris Robinson2017-04-191-1/+2
|
* Store the source queue head in the voice to signify loopingChris Robinson2017-04-181-3/+2
| | | | | This removes the need to access a couple more source fields in the mixer, and also makes the looping and queue fields non-atomic.
* Store the source prop updates with the mixer voiceChris Robinson2017-04-171-57/+0
| | | | Also move its declaration and rename it for consistency.
* Use an atomic flag to test if a source needs to updateChris Robinson2017-03-201-1/+1
|
* Don't defer source state or offset changesChris Robinson2017-03-191-4/+0
|
* Move ALvoice declaration to alu.hChris Robinson2017-03-091-54/+0
|
* Remove unnecessary atomic membersChris Robinson2017-03-081-41/+41
|
* 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
|
* 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.
* 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.
* 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-211-1/+1
|
* Make the voices' Send[] array dynamically sizedChris Robinson2017-02-211-1/+1
| | | | | 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.
* 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-141-4/+4
| | | | | | 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-131-1/+1
|
* Use ALsizei in more placesChris Robinson2017-01-181-4/+4
|
* 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
|
* 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.
* 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.
* Move the input channel array out of the DirectParams and SendParamsChris Robinson2016-07-131-2/+4
|
* Store the voice output buffers separate from the paramsChris Robinson2016-07-111-0/+10
|
* Reorder some source fieldsChris Robinson2016-07-071-5/+5
|
* Remove some unnecessary volatile keywordsChris Robinson2016-06-031-31/+31
|
* Make a function staticChris Robinson2016-06-011-1/+0
|
* Make the source position calues atomicChris Robinson2016-05-191-2/+2
|
* Avoid redundantly storing distance model settingsChris Robinson2016-05-171-1/+1
|
* Don't store the source's update method with the voiceChris Robinson2016-05-161-3/+0
|
* Provide asynchronous property updates for sourcesChris Robinson2016-05-141-23/+81
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Hold the source map lock while handling itChris Robinson2016-05-101-2/+11
|
* Find a valid source buffer before updating the voiceChris Robinson2016-05-091-1/+1
|
* Implement AL_EXT_STEREO_ANGLES supportChris Robinson2016-03-251-0/+5
|
* Calculate channel gain stepping just before mixingChris Robinson2016-02-141-0/+3
|
* Make the source's buffer queue a singly-linked listChris Robinson2016-01-311-1/+0
|
* Implement a band-limited sinc resamplerChris Robinson2015-11-051-0/+2
| | | | | | | | This is essentially a 12-point sinc resampler, unless it's resampling to a rate higher than the output, at which point it will vary between 12 and 24 points and do anti-aliasing to avoid/reduce frequencies going over nyquist. Code provided by Christopher Fitzgerald.
* Use a constant value for the post-position paddingChris Robinson2015-10-151-1/+1
|
* Store the source's previous samples with the voiceChris Robinson2015-10-151-0/+2
| | | | | | This helps avoid different results when looping is toggled within a couple samples of the loop point, or when a processed buffer is removed while the source is only a couple samples into the next buffer.
* Move the resampler stuff to mixer.c where it's usedChris Robinson2015-10-011-5/+0
|
* Don't keep selecting the mixer to useChris Robinson2015-09-271-2/+0
|
* Use aluVector in some more placesChris Robinson2014-12-161-3/+3
|