aboutsummaryrefslogtreecommitdiffstats
path: root/al
Commit message (Collapse)AuthorAgeFilesLines
* Check the correct ID value for clearing the deferred flagChris Robinson2023-03-111-1/+1
| | | | | | property_id is the original value with the deferred flag in the msb. If the call is deferred, that flag is set, preventing it from matching any of the enums. The property_id_ member has the ID without the flag.
* Don't set a default EAX version for fx slotsChris Robinson2023-03-111-1/+0
|
* Update the EAX version after setting fx slot propertiesChris Robinson2023-03-111-7/+10
|
* Avoid copying to a temporaryChris Robinson2023-03-1111-120/+116
|
* Remove some more unnecessary clampsChris Robinson2023-03-111-46/+20
|
* Remove an unused functionChris Robinson2023-03-111-8/+0
|
* Rename some struct members for clarityChris Robinson2023-03-1113-151/+153
|
* Convert the remaining EAX effectsChris Robinson2023-03-115-649/+410
|
* Simplify committing EAX effect propertiesChris Robinson2023-03-115-242/+78
| | | | | | | | | | There's no need to explicitly clamp to EFX limits when they're the same as or more lenient than EAX, which were already validated when set, or when it's within tolerance of the effect implementation. Also it's generally better to check once all properties for changes and apply them all if one is different, rather than checking and setting each member individually.
* Convert the EAX Frequency Shifter effectChris Robinson2023-03-112-152/+107
|
* Don't commit EAX updates in applyAllUpdatesChris Robinson2023-03-112-36/+9
| | | | | | | | | | To avoid alcProcessContext causing deferred EAX properties to be committed. This simplifies updates when EAX has been initialized, but never or rarely used. Committing now always occurs in EAXSet when the property is non-deferred, updating the OpenAL object(s) with it (with OpenAL's updates then being applied based on the context's defer state).
* Convert the EAX Echo and Equalizer effectsChris Robinson2023-03-114-521/+389
|
* Convert the EAX Autowah and Compressor effectsChris Robinson2023-03-114-356/+278
|
* Convert the EAX Compressor effectChris Robinson2023-03-104-130/+93
| | | | And combine some type checks.
* Convert EAX chorus and flanger effectsChris Robinson2023-03-104-195/+207
|
* Rework EAX effect handlingChris Robinson2023-03-107-1406/+1078
| | | | | | | Allocate a base EaxEffect object once for all effect types, instead of reallocating different derived types on effect changes. The reverb and null effects have been converted to the new interface, the others are currently broken/unsupported, but will be restored shortly.
* Update the effect EAX version only after setting a propertyChris Robinson2023-03-091-5/+4
|
* Have the null effect inherit from EaxEffect4Chris Robinson2023-03-091-14/+35
|
* Add a type indicator to EaxEffectPropsChris Robinson2023-03-0912-55/+84
|
* Store the per-version EAX effect state in the base classChris Robinson2023-03-0914-471/+491
| | | | | | | | | | | | | | | | This is the start of the refactoring for holding separable per-version EAX effects. Currently the effect state is stored in the effect object, which is instantiated per-type. This makes it impossible for different effects to be assigned on different EAX versions for a given effect slot (e.g. if the app sets a Chorus effect on EAX4 Slot0, it would fail to get or set the EAX1/2/3 reverb properties since it's a Chorus effect object). Seperate per-version effects will allow for switching the OpenAL effect by switching versions. This will provide an extra benefit in being able to delay OpenAL effect initialization until some EAX version has been set, avoiding an extraneous reverb and/or chorus processor for apps that only query some EAX properties but don't set anything (or which only use Slot0, leaving Slot1 with a defaulted Chorus effect running).
* Support aLaw samples for UHJChris Robinson2023-03-071-1/+4
|
* Don't use "hardware" for automatic buffer storageChris Robinson2023-03-072-14/+37
|
* Avoid duplicate parameter validationChris Robinson2023-03-071-7/+6
|
* Add queries for the buffer byte/sample/sec lengthChris Robinson2023-03-071-0/+13
| | | | | | | | | | | | | 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.
* Don't assume the max property size unchecked for user pointersChris Robinson2023-03-061-56/+193
|
* Don't get the front element of an empty queueChris Robinson2023-03-051-1/+4
|
* Report the current buffer ID of a streaming sourceChris Robinson2023-03-051-2/+13
| | | | | | The AL_BUFFER query should only return the buffer that was set on a static source, but some apps used it to detect when a current buffer of a streaming source changed instead of AL_BUFFERS_PROCESSED.
* Use macros for the likely/unlikely attributesChris Robinson2023-03-0110-417/+417
| | | | | The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places.
* Remove another gratuitous [[likely]]Chris Robinson2023-02-281-1/+1
|
* Add formats for UHJ with muLaw, and ADPCM for 2-channel UHJChris Robinson2023-02-261-4/+9
| | | | | | | | | | ADPCM doesn't seem to be well defined for more than two channels, even though there doesn't seem to be any issue with simply increasing the channel step over interleaved data (ffmpeg refuses to create IMA4 or MSADPCM files with more than two channels, and its decoder behaves oddly different when channels > 2). So IMA4 and MSADPCM can only safely handle 2-channel UHJ. There's no problem with muLaw supporting 2-, 3-, or 4-channel UHJ though.
* Don't start with fading for negative offsetsChris Robinson2023-02-181-2/+4
|
* Track the callback buffer base separatelyChris Robinson2023-02-181-0/+1
| | | | | Instead of recalculating it all the time, even for sources that don't use callback buffers.
* Set the proper block align for callback buffersChris Robinson2023-02-161-1/+1
|
* Remove unused decoder functionsChris Robinson2023-02-141-202/+2
|
* Don't convert MS ADPCM on loadChris Robinson2023-02-142-37/+7
|
* Support MSADPCM samples in the mixerChris Robinson2023-02-141-1/+3
|
* Don't convert IMA4 samples on loadChris Robinson2023-02-142-100/+98
|
* Support IMA4 ADPCM as a mixing voice formatChris Robinson2023-02-143-20/+22
|
* Separate decoding and mixing from resamplingChris Robinson2023-02-121-3/+9
|
* Don't set an EAX version by default for sourcesChris Robinson2023-02-052-34/+10
| | | | | | | | | 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.
* Don't force an update if there is no aux slot being replacedChris Robinson2023-01-201-4/+7
| | | | | A null effect slot can't be deleted, so we don't need to make sure it's set to change before returning.
* 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]>
* Avoid unnecessary uses of make_optionalChris Robinson2023-01-137-57/+57
|
* Avoid some explicit casts and referencesChris Robinson2023-01-012-4/+4
|
* Avoid a manual loop to find a buffer queue entryChris Robinson2022-12-241-6/+3
|
* Constify some parametersChris Robinson2022-12-241-16/+16
|
* Avoid using a macro to set a context error and returnChris Robinson2022-12-246-84/+89
|
* Avoid some macros for checking property sizes and valuesChris Robinson2022-12-241-169/+228
|
* Use a bitset for the enabled event flagsChris Robinson2022-12-161-14/+9
|
* Avoid inlining certain exception functionsChris Robinson2022-12-165-27/+24
|