aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add queries for the buffer byte/sample/sec lengthChris Robinson2023-03-071-0/+1
| | | | | | | | | | | | | These used to exist with the now-defunct AL_SOFT_buffer_samples extension, this just restores those queries without extra baggage. The sample length query are necessary when handling ADPCM buffers, since the size/channels*8/bits calculation is incorrect with ADPCM. 'Bits' is usually reported as 4 since most samples in a block are stored as nibbles, but that's only approximate and doesn't account for the block header. The average number of bits per sample in an ADPCM block can't be represented as an integer, so the more blocks there are stored in the buffer, the more inaccurate the calculation becomes.
* Add AL_SOFT_UHJ_ex to the extension listChris Robinson2023-02-261-1/+2
|
* Avoid using auto for lambda parametersChris Robinson2023-02-061-1/+1
|
* Don't set an EAX version by default for sourcesChris Robinson2023-02-051-9/+0
| | | | | | | | | Presuming sources start in a neutral state for EAX effects, that is they're not affected by EAX by default, there's no need to set an active EAX state for one until the app sets an EAX property on it. Since the deferred and immediate properties are stored independently per-version, they can always be set to defaults, and simply not have a particular version committed as active until the app sets an EAX property, which will inherently set the active version.
* clang-tidy cleanups (#800)Rosen Penev2023-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clang-tidy: use bool literals Found with modernize-use-bool-literals Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: replace std::bind with lambdas Found with modernize-avoid-bind Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: use data() instead of pointer stuff Found with readability-container-data-pointe Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: use empty() Found with readability-container-size-empty Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: remove static in anon namespace Found with readability-static-definition-in-anonymous-namespace Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: remove const return Found with readability-const-return-type Signed-off-by: Rosen Penev <[email protected]> Signed-off-by: Rosen Penev <[email protected]>
* Use a simple spinlock to protect the current global contextChris Robinson2022-12-301-0/+8
| | | | | This will be much for efficient than a recursive mutex, given the amount of contention will be very low.
* Rename a potentially confusing member functionChris Robinson2022-12-081-2/+2
|
* Add preliminary support for 7.1.4 output modesChris Robinson2022-11-031-0/+4
| | | | | | | | I don't know how different sound APIs handle 7.1.4 ("Atmos" or "Auro3D") output, but currently it simply specifies the additional channels with the height channel labels. This isn't likely how it works for a virtualized channel bed, for playing over other with-height configurations (7.1.2, 5.1.4, etc), but this should be an okay start.
* Add functions to start sources at a particular device timeChris Robinson2022-11-031-0/+1
| | | | | | | | This starts a source at a particular device clock time, rounded to the nearest sample (really, 4th sample for SIMD reasons), allowing to start a sound at a particular point in the output instead of the next update. Unlike using negative offsets, this is not affected by pitch/velocity.
* [EAX_CONTEXT] Fix defaults for current propertiesBoris I. Bendovsky2022-07-171-4/+36
|
* [EAX_FX_SLOT] Mark sources as changed instead of commiting them to catch up ↵Boris I. Bendovsky2022-07-171-6/+1
| | | | with changes in FX slot
* Don't pass an EaxCall to initialize_fx_slotsChris Robinson2022-07-151-7/+6
|
* Don't store and manage wet buffers separatelyChris Robinson2022-07-151-5/+0
|
* Allocate EffectSlots in clustersChris Robinson2022-07-151-1/+6
|
* Dynamically allocate EffectSlot objectsChris Robinson2022-07-151-2/+2
|
* Don't track dirty flags per EAX versionChris Robinson2022-07-131-22/+18
| | | | | Only the current version's flags are used, and they're all reset when changing versions, making it unnecessary to track non-current version flags.
* Don't commit EAX properties when not initializedChris Robinson2022-07-131-1/+2
|
* [EAX] Add separate context state for each version (#731)Boris I. Bendovsky2022-07-131-536/+365
|
* [EAX] Use separate FX slot state for each version (#730)Boris I. Bendovsky2022-07-121-13/+4
| | | | | | | * [EAX] Use separate FX slot state for each version [EAX] Don't defer FX slot properties * [EAX_FXSLOT] Use mPropsDirty to defer update [EAX_CONTEXT] Commit all updates on first initialization
* Remove an unused lambda captureChris Robinson2022-06-181-1/+1
|
* [EAX] Add separate source state for each version (#720)Boris I. Bendovsky2022-06-181-12/+6
|
* [EAX] Add separate effect state for each version (#705)Boris I. Bendovsky2022-05-241-120/+94
| | | | | * [EAX] Add separate effect state for each version * [EAX] Don't use EAX call as data member
* Move EAX files to their own sub-directoryChris Robinson2022-05-161-2/+2
|
* Handle 3D7.1 as a separate channel configurationChris Robinson2022-04-261-0/+4
| | | | | | | It's treated as 5.1 + 2 aux channels. This allows AL_DIRECT_CHANNELS_SOFT to behave better, not forwarding rear left/right channel inputs to lower front and upper rear, and allows reporting a more appropriate output mode to the app instead of 7.1.
* Finalize AL_SOFT_UHJChris Robinson2022-04-131-1/+1
|
* Finalize AL_SOFT_callback_bufferChris Robinson2022-04-011-1/+1
|
* Ensure the EAX functions are suitably aligned on 32-bitChris Robinson2022-03-161-2/+2
|
* Simplify committing EAX propertiesChris Robinson2022-03-051-18/+5
| | | | | | Based on DirectSound's EAX behavior, committing any EAX property commits *all* deferred property changes, not just the object being changed. So applying EAX changes can be handled in one place.
* Fix applying the EAX context AirAbsorptionHF propertyChris Robinson2022-03-021-1/+1
|
* Remove AL_SOFTX_filter_gain_exChris Robinson2022-02-281-1/+0
| | | | | | It was only added to try to help DSOAL, and it's not clear if it's even necessary. But with native EAX API support, it certainly isn't necessary anymore.
* Use a simpler loop to enumerate sourcesChris Robinson2022-02-211-160/+17
|
* Implement EAX v1.0 (#664)Boris I. Bendovsky2022-02-211-10/+10
|
* Avoid a variable limit on EAX filtersChris Robinson2022-02-181-6/+0
| | | | | | I'll assume for now that the limits for the EAX properties will keep the filter gain from getting out of hand. The filter's gainhf is relative to the gain and is limited to 0dB max.
* Access the proper FX slot indexChris Robinson2022-02-141-3/+5
|
* Commit EAX context properties when a context stops deferringChris Robinson2022-02-131-0/+3
|
* Force EAX calls to defer when the AL context is deferringChris Robinson2022-02-131-13/+12
|
* Avoid more unnecessary atomicsChris Robinson2022-02-131-6/+5
|
* Commit source EAX properties when not deferringChris Robinson2022-02-131-7/+0
| | | | And make sure they get committed when resuming processing.
* Inline some more simple gettersChris Robinson2022-02-081-27/+0
|
* Handle AirAbsorptionGainHF as a native context propertyChris Robinson2022-02-081-7/+3
|
* Combine listener and context updatesChris Robinson2022-02-081-5/+1
|
* Apply updates for EAX context propertiesChris Robinson2022-02-081-22/+35
|
* Actually defer EAXCONTEXT_ALLPARAMETERS propertiesChris Robinson2022-02-081-19/+19
|
* Ensure sources update together from EAX commitsChris Robinson2022-02-081-5/+8
| | | | ... when a listener property change forces a commit.
* Hold mPropLock when deferring updatesChris Robinson2022-02-081-1/+0
|
* Inline ALCcontext::has_eaxChris Robinson2022-02-081-5/+0
|
* More accurately detect the EAX speaker configChris Robinson2022-02-081-9/+21
|
* DisabledEffects won't change so EAX can just check it onceChris Robinson2022-02-081-17/+1
|
* EAX various fixes (#657)Boris I. Bendovsky2022-02-081-20/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [EAX] Fix effect GUID validation Only NULL and REVERB was valid. * [EAX] Fix default FX slot flags EAX4 and EAX5 both sets to ENVIRONMENT. * [EAX] Set default values for legacy FX slots in the initialization * [EAX] Fix FX slot locking policy Fail on attempt to load an effect or change a lock for EAX4 "set" call. Unlock legacy FX slots on any EAX5 call. * [EAX] Allow DEFER flag for "get" calls. * [EAX] Make speaker configuration read-only * [EAX] Initialize speaker configuration * [EAX] Commit EAX source on a 3D source parameter call Reference: EAX 4.0 Programmer's Guide * [EAX] Commit EAX source on a 3D listener parameter call Reference: EAX 4.0 Programmer's Guide * [EAX] Commit source when it begins to play Reference: EAX 4.0 Programmer's Guide
* Avoid a proxy ALfilter object for EAX source propertiesChris Robinson2022-02-071-28/+1
|