aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a method to queue multiple buffer layers onto a sourceChris Robinson2018-05-211-0/+115
|
* Store the ALbufferlistitem's composited/max sample lengthChris Robinson2018-03-271-79/+43
|
* Move the filter implementation to a separate directoryChris Robinson2018-03-221-0/+1
|
* Don't check for space in the ringbuffer before trying to writeChris Robinson2018-03-031-3/+2
| | | | The write method already checks and returns how much it managed to fit in.
* Use a plain mutex for the property lockChris Robinson2018-03-031-48/+24
|
* Count all buffers in a list item for processed and queuedChris Robinson2018-02-251-34/+51
|
* Don't make the source state atomicChris Robinson2018-02-241-23/+16
|
* Handle source state change eventsChris Robinson2018-02-241-11/+56
|
* Combine multiple functions called sequentiallyChris Robinson2018-02-111-6/+2
|
* Remove unsupported source queriesChris Robinson2018-02-041-124/+0
|
* Make the Connected state atomicChris Robinson2018-02-041-1/+1
| | | | Also don't send the Disconnected event more than once.
* Add a couple missing lock callsChris Robinson2018-02-031-0/+4
|
* Remove the unused thunk codeChris Robinson2018-02-021-1/+0
|
* Remove the individual source queue and buffer locksChris Robinson2018-02-021-83/+4
| | | | | | | They're inherently protected by the mutex for their respective lists. Should those mutexes be replaced by rwlocks the individual locks should also be reinstated, but they're unlikely to be unless a lot of contention starts happening in the read-only case.
* Store an index to a given source's voiceChris Robinson2018-02-011-10/+15
| | | | For more efficient voice lookups when needed.
* Move some inline functions into a header instead of copying themChris Robinson2018-01-271-11/+11
| | | | | Unfortunately does not include the Lookup* functions, which need the full type declaration to offset the pointer.
* Fix error reporting for resource generationChris Robinson2018-01-271-4/+6
|
* Store filters in an array of listsChris Robinson2018-01-271-6/+20
|
* Use a vector to store the effect slot pointersChris Robinson2018-01-271-5/+13
| | | | And make the ID a simple index into it (1-base, to avoid ID 0).
* Use an array lookup for source IDsChris Robinson2018-01-271-124/+193
| | | | | This is now similar to buffers, being stored in groups of 64 in a vector with the ID providing the array indices.
* Make some more functions static where they're usedChris Robinson2018-01-271-7/+14
|
* Use a different method for storing and looking up buffersChris Robinson2018-01-271-8/+23
| | | | | | | | | | | | | | | | | Rather than each buffer being individually allocated with a generated 'thunk' ID that's used with a uint:ptr map, buffers are allocated in arrays of 64 within a vector. Each group of 64 has an associated 64-bit mask indicating which are free to use, and the buffer ID is comprised of the two array indices which directly locate the buffer (no searching, binary or otherwise). Currently no buffers are actually deallocated after being allocated, though they are reused. So an app that creates a ton of buffers once, then deletes them all and uses only a couple from then on, will have a bit of waste, while an app that's more consistent with the number of used buffers won't be a problem. This can be improved by removing elements of the containing vector that contain all-free buffers while there are plenty of other free buffers. Also, this method can easily be applied to other resources, like sources.
* Construct error messages using parameterized valuesChris Robinson2018-01-251-130/+136
|
* Provide messages for the remaining AL errorsChris Robinson2018-01-241-45/+70
|
* Call the event callback when an error is generatedChris Robinson2018-01-241-64/+64
| | | | | Most errors don't yet provide correct object IDs or text messages for the AL error.
* Add a flag for persistent mappingChris Robinson2018-01-231-2/+3
| | | | And a function to "flush" a mapped buffer
* More cleanup for buffer loadingChris Robinson2018-01-211-7/+6
| | | | | Don't bother with unnecessary and unused converters, and remove some unsupported queries.
* Add methods to "map" a buffer's storageChris Robinson2018-01-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | Requires the MAP_READ_BIT or MAP_WRITE_BIT flags to be OR'd with the format upon a call to alBufferData, to enable mappable storage for the given access types. This will fail if the format requires internal conversion and doesn't resemble the original input data, so the app can be guaranteed the size, type, and layout of the original data is the same as what's in storage. Then alMapBufferSOFT may be called with appropriate bit flags to get a readable and/or writable pointer to the buffer's sample storage. alUnmapBufferSOFT must be called when access is finished. It is currently invalid to map a buffer that is attached to a source, or to attach a buffer to a source that is currently mapped. This restriction may be eased in the future, at least to allow read- only access while in use (perhaps also to allow writing, if coherency can be achieved). Currently the access flags occupy the upper 8 bits of a 32-bit bitfield to avoid clashing with format enum values, which don't use more than 16 or 17 bits. This means any future formats are limited to 24-bit enum values, and also means only 8 flags are possible when declaring storage. The alternative would be to add a new function (alBufferStorage?) with a separate flags parameter.
* Use a voice flag to indicate it being staticChris Robinson2018-01-161-0/+1
|
* Allow storing multiple buffers in a ALbufferlistitemChris Robinson2017-12-151-67/+143
| | | | | | | | | | | | | | | 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.
* Add queries to get the source offset with the device clockChris Robinson2017-12-031-0/+32
|
* Re-update effect slots when context properties changeChris Robinson2017-09-271-9/+9
| | | | | Also keep all free property update structs together in the context instead of per-object.
* Don't force a fade-in when resuming a paused sourceChris Robinson2017-06-091-11/+1
| | | | | | | | This needs to be handled more automatically by the mixer to work correctly. Otherwise, requiring a property update on resume can put the source into a playing state with the mixer never playing it, due to not having valid mixing parameters and the mixing parameters not getting calculated because no updates are specified by the app (and forcing an update can break deferred updates).
* Rename RollOff to RolloffChris Robinson2017-05-051-4/+4
|
* Start an extension to change the source's spatialize propertyChris Robinson2017-05-051-0/+22
|
* Add a property to force source spatialization on or offChris Robinson2017-05-041-0/+2
|
* Rename 'moving' flag to 'fading'Chris Robinson2017-05-021-5/+5
|
* Set a voice as 'moving' if it starts/resumes at an offsetChris Robinson2017-05-021-8/+21
|
* Remove const from _Atomic vars to make Clang happyChris Robinson2017-04-211-6/+12
| | | | | | | | Clang does not allow using C11's atomic_load on const _Atomic variables. Previously it just disabled use of C11 atomics if atomic_load didn't work on a const _Atomic variable, but I think I'd prefer to have Clang use C11 atomics for the added features (more explicit memory ordering) even if it means a few instances of breaking const.
* Add the ability to change the source resamplerChris Robinson2017-04-211-0/+22
|
* Store the resampler as part of the sourceChris Robinson2017-04-211-0/+2
|
* Missed a raw atomic variable accessChris Robinson2017-04-201-2/+3
|
* Make the buffer list next pointer atomicChris Robinson2017-04-191-27/+32
|
* Use a different way to get the size of structs with flexible array membersChris Robinson2017-04-181-1/+1
|
* Store the source queue head in the voice to signify loopingChris Robinson2017-04-181-145/+134
| | | | | 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-43/+25
| | | | Also move its declaration and rename it for consistency.
* Use separate atomic macros for pointersChris Robinson2017-04-141-10/+9
|
* Handle the source offset fraction as an ALsizeiChris Robinson2017-04-081-7/+9
|
* Make sure the mix is done after setting the looping propertyChris Robinson2017-04-021-0/+9
|
* Fix handling of the PropsClean flagsChris Robinson2017-03-231-1/+1
|