aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Avoid using a macro to wrap standard attributesChris Robinson2022-12-061-135/+135
|
* Avoid LIKELY/UNLIKELY macrosChris Robinson2022-12-051-119/+119
|
* Use standard likely/unlikely attributes when availableChris Robinson2022-12-051-18/+18
|
* Add functions to start sources at a particular device timeChris Robinson2022-11-031-161/+234
| | | | | | | | 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.
* Add the ability to start a voice at a particular timeChris Robinson2022-11-031-0/+2
|
* int64_t max can't fit into a double without narrowingChris Robinson2022-11-021-6/+0
|
* Handle negative voice positionsChris Robinson2022-11-021-36/+66
| | | | | | This allows a voice/source to start with a delay, more accurately than simply waiting to call alSourcePlay. The delay is affected by pitch and velocity, making it useful to simulate distant sounds that take time to be heard.
* Remove a redundant checkChris Robinson2022-07-171-3/+0
| | | | | | If src_occlusion_mb is 0, it'll be multiplied with whatever the ratio ends up being, which will result in 0 anyway. A number of uses also already check the occlusion value before calling the method.
* Fix parameter signednessChris Robinson2022-07-171-1/+1
|
* [EAX_SOURCE] Fix source's occlusion and exclusion contributionBoris I. Bendovsky2022-07-171-17/+44
| | | | Source's oclussion and exclusion properties should be taken into account only for listener's environment (see p. 16, p. 56, pp. 62-63 and p. 64 of "EAX® 4.0 Programmer’s Guide").
* [EAX_SOURCE] Skip occlusion calculation if occlusion property is zeroBoris I. Bendovsky2022-07-171-3/+7
|
* [EAX_SOURCE] Fix Room and RoomHF contributionBoris I. Bendovsky2022-07-171-2/+3
| | | | Those properties should be taken into account only for environmental effect slot (see pp. 60-61 of "EAX® 4.0 Programmer’s Guide").
* [EAX_SOURCE] Fix getting active FX slot IDsBoris I. Bendovsky2022-07-171-2/+11
|
* [EAX_FX_SLOT] Fix slot's occlusion contributionBoris I. Bendovsky2022-07-171-1/+3
|
* Dynamically allocate EffectSlot objectsChris Robinson2022-07-151-2/+2
|
* Don't always activate the EAX primary effect slot for sourcesChris Robinson2022-07-061-14/+22
| | | | | The context's primary effect slot should only be considered when the source's active slot IDs include the primary effect slot.
* Combine multiple individual flagsChris Robinson2022-06-191-48/+32
|
* Track EAX1 source changesChris Robinson2022-06-191-9/+6
| | | | | | Even though it's only a single value, this allows for not having to explicitly track version changes, since the version being changed to will always have a property change, implicitly marking an EAX update/commit for the source.
* Avoid changing the EAX version on failureChris Robinson2022-06-181-3/+2
|
* Fix inverted checksChris Robinson2022-06-181-4/+4
|
* Don't mark the EAX version changed when getting propertiesChris Robinson2022-06-181-4/+5
|
* Avoid a full struct compare to check for changesChris Robinson2022-06-181-10/+15
|
* Fix checking if the primary effect slot changedChris Robinson2022-06-181-6/+1
|
* [EAX] Add separate source state for each version (#720)Boris I. Bendovsky2022-06-181-1959/+823
|
* [EAX] Add separate effect state for each version (#705)Boris I. Bendovsky2022-05-241-166/+197
| | | | | * [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-1/+1
|
* Avoid some explicit extern "C"s on function definitionsChris Robinson2022-03-311-1/+1
|
* Replace a few asserts with actual checks or ASSUME()Chris Robinson2022-03-301-6/+6
|
* Inline a couple dispatch callsChris Robinson2022-03-261-13/+0
|
* Make sure FX slots that aren't made active are disabledChris Robinson2022-03-131-9/+6
|
* Fix EAXSOURCE_ROLLOFFFACTORChris Robinson2022-03-051-2/+6
| | | | It should be added to AL_ROLLOFF_FACTOR.
* Set the MacroFXFactor defaultChris Robinson2022-03-051-0/+1
|
* Simplify committing EAX propertiesChris Robinson2022-03-051-6/+0
| | | | | | 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.
* Revert "Use std::exchange instead of two swaps"Chris Robinson2022-02-221-1/+2
| | | | This reverts commit aa19223c65d8693dbaa8d8c9fa0c129d77eed4de.
* Implement EAX v1.0 (#664)Boris I. Bendovsky2022-02-211-0/+75
|
* Avoid a variable limit on EAX filtersChris Robinson2022-02-181-8/+4
| | | | | | 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.
* Use std::exchange instead of two swapsChris Robinson2022-02-151-2/+1
|
* Add missing closing braceChris Robinson2022-02-141-1/+1
|
* Don't access a playing voice's mFlags outside of the mixer threadChris Robinson2022-02-141-8/+2
| | | | | It's updated asynchronously, and it's non-atomic, so it's unsafe to even read since the mixer thread may be modifying it.
* Access the proper FX slot indexChris Robinson2022-02-141-1/+1
|
* Avoid some messy type-punningChris Robinson2022-02-141-29/+11
|
* Derive EaxFxSlotIndex from an optionalChris Robinson2022-02-141-2/+2
|
* Avoid an unnecessary checkChris Robinson2022-02-131-9/+6
|
* Avoid more unnecessary atomicsChris Robinson2022-02-131-2/+2
|
* Fix error messages for AL_STEREO_MODE_SOFTChris Robinson2022-02-131-2/+4
|
* Remove unnecessary IsPlayingOrPaused callsChris Robinson2022-02-131-42/+28
| | | | | When followed by GetSourceVoice, a voice can only be returned if the source is playing or paused, making it redundant.
* Remove an unused return typeChris Robinson2022-02-131-54/+61
|
* Don't make mPropsDirty atomicChris Robinson2022-02-131-16/+27
| | | | It's only ever used under the ALCcontext::mPropLock mutex.
* Commit source EAX properties when not deferringChris Robinson2022-02-131-61/+78
| | | | And make sure they get committed when resuming processing.
* Fix an exported symbolChris Robinson2022-02-121-1/+1
| | | | | | The symbol only exists for compatibility due to it having been erroneously exported in previous versions (even though it shouldn't have been used directly, some apps could have).