aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move ContextBase and VoiceChange to coreChris Robinson2021-04-271-1/+1
|
* Partially implement an extension to hold sources on disconnectChris Robinson2021-04-261-14/+24
| | | | | | | | Rather than stopping voices/sources when the device becomes disconnected, the context can be set to leave them alone. As a consequence, their state will remain as playing and they'll keep their last known sample offset indefinately. For applications mindful of this behavior, it will allow resetting or reopening the device to reconnect and automatically resume where it left off.
* Move bformatdec to coreChris Robinson2021-04-251-1/+1
|
* Create a base the ALCdevice and ALCcontext structsChris Robinson2021-04-241-11/+11
| | | | | A base that contains the API-agnostic data, with ALCdevice and ALCcontext being for AL-specific data.
* Fix dirty flag checkChris Robinson2021-04-181-1/+1
|
* Restore missing AL_SOFT_source_length queriesChris Robinson2021-04-151-0/+93
|
* Make an inverted atomic flag type and use itChris Robinson2021-04-151-5/+5
| | | | | | | | The inverted atomic flag replaces test_and_set+clear with test_and_clear+set, essentially inverting the flag status. This makes more logical sense for flagging dirty state, which is less confusing than flagging clean state. The one caveat is ATOMIC_FLAG_INIT (or default construction in C++20) initializes the state to true rather than false.
* Add support for 4-channel UHJChris Robinson2021-03-311-4/+4
| | | | Also add the SOFT moniker to the new macros
* Handle 3-channel UHJ audio buffersChris Robinson2021-03-311-2/+4
|
* Decode UHJ buffers to B-Format for mixingChris Robinson2021-03-311-4/+4
| | | | | This should also have an adjustment for the shelf filter. Although it's not clear what the appropriate adjustments should be.
* Combine some duplicate codeChris Robinson2021-03-301-42/+1
|
* Load/convert samples from all channels at once for mixingChris Robinson2021-03-191-7/+8
| | | | | | | This uses a bit more memory (each voice needs to hold buffers for the deinterleaved samples of each channel, instead of just one buffer for the current channel being mixed on the device), but it will allow for handling formats that need or prefer their channels decoded together.
* Add a alSourceQueueBufferLayersSOFT stubChris Robinson2021-02-041-0/+11
| | | | For compatiblity with apps that may have directly linked to it on accident.
* Make sure InitVoice is given a valid buffer queue itemChris Robinson2021-01-261-2/+2
|
* Use an AL-specific buffer queue item struct for sourcesChris Robinson2021-01-251-36/+32
|
* Use a deque for the source buffer queueChris Robinson2021-01-251-148/+112
| | | | | | This mainly avoids having to allocate ~64-byte structures individually. The mixing voice still holds the queue as a linked list so as to be container- agnostic.
* Store the callback in the buffer list itemChris Robinson2021-01-241-1/+3
|
* Store buffer info in the queue entryChris Robinson2021-01-241-3/+8
|
* Make PopCount and CountTrailingZeros more standard-likeChris Robinson2021-01-221-3/+4
|
* Avoid global constexpr arraysChris Robinson2021-01-211-2/+2
|
* Add a crossover frequency field for the deviceChris Robinson2020-12-261-1/+1
| | | | | | Used when upsampling low-order ambisonic signals to higher order. Rather than a hardcoded 400hz, it ensures a consistent crossover point when an ambdec configuration is used. It can also allow for an alsoft config option.
* Move alexcpt to coreChris Robinson2020-12-241-1/+1
|
* Move logging to coreChris Robinson2020-12-171-1/+1
|
* Don't link DistanceModel enums to AL valuesChris Robinson2020-12-161-10/+39
|
* Use a separate enum for the VoiceChange stateChris Robinson2020-12-161-7/+7
|
* Move VoiceChange to a separate headerChris Robinson2020-12-161-0/+1
|
* Move ambidefs.h to coreChris Robinson2020-12-121-1/+1
|
* Move the filters to coreChris Robinson2020-12-041-2/+2
|
* Make sure batched source updates are with the proper voiceChris Robinson2020-11-241-6/+9
|
* Make ALbuffer inherit from BufferStorageChris Robinson2020-11-211-72/+55
|
* Disassociate internal voice enums from AL enumsChris Robinson2020-11-201-12/+62
|
* Use BufferStorage for the buffer queueChris Robinson2020-11-191-92/+107
|
* Use a separate structure for the active effect slot propertiesChris Robinson2020-11-071-2/+4
|
* Replace the mixer fraction macros with constexpr variablesChris Robinson2020-10-211-9/+8
|
* Replace some more macros with constexpr variablesChris Robinson2020-10-211-1/+1
|
* Change some more macros into constexpr variablesChris Robinson2020-10-211-7/+7
|
* Declare variables closer to where they're usedChris Robinson2020-10-131-50/+43
|
* Use inline functions for popcnt and ctz instead of macrosChris Robinson2020-10-131-4/+3
|
* Use a separate structure for buffer storageChris Robinson2020-08-281-21/+22
|
* Clarify an error messageChris Robinson2020-05-251-3/+5
|
* Use an enum class for SpatializeModeChris Robinson2020-05-211-1/+1
|
* Fix up some more uses of [AL[C]]voidChris Robinson2020-04-281-24/+24
|
* Fix the source ID for a source voice stopped from deletionChris Robinson2020-04-211-1/+1
|
* Track a buffer's ambisonic orderChris Robinson2020-04-041-10/+16
|
* Rename ALvoice and related structs to VoiceChris Robinson2020-03-281-45/+45
|
* Avoid some extraneous uses of AL type aliasesChris Robinson2020-03-251-88/+88
|
* Dynamically allocate voice channel dataChris Robinson2020-03-251-13/+13
| | | | | | | Rather than allocating for a full 8 channels for each voice, when the vast majority will only need 1 or 2. The voice channel data is relatively big since it needs to hold HRTF coefficients and history, and this will allow increasing the maximum number of buffer channels without an obscene memory increase.
* Use inline initialization more for sourcesChris Robinson2020-03-231-45/+0
|
* Fix voices being forced to update without valid propertiesChris Robinson2020-03-041-2/+3
| | | | | | | | | | | | | | | | When starting a voice, the source ID was set before its first update struct was provided, creating a small window where a listener or effect slot update could force a voice to update without it having any valid properties to update with. Supplying the update struct first would create a different race, where the mixer could see a voice without a source but with an update struct, causing the update struct to be 'freed' without being applied. The fix here is to provide the update struct before setting the source ID, and change the mixer to ignore update structs for voices without a source ID. This can pseudo-orphan the updates that get set on a voice just as it stops, leaving the struct unusable until the voice is used again, or the voice gets deleted which will clear it. But it allows the update struct to stay in place and get applied once the voice gets a source ID.
* Avoid redundantly setting voice membersChris Robinson2020-03-041-26/+24
|