aboutsummaryrefslogtreecommitdiffstats
path: root/al/buffer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make the API functions noexceptChris Robinson2023-05-221-15/+5
| | | | | | | | | | | Only relevant for C++, but these functions can't throw as it's a C-based API. Letting the compiler know that helps improve code generation. Extension callbacks must also not let exceptions leave the callback, or else Bad Things can happen. The macro AL_DISABLE_NOEXCEPT may be defined before including the headers to not mark functions as noexcept, but this should only be done if the caller can't otherwise be fixed.
* Fix linkage definitionsChris Robinson2023-05-141-24/+24
|
* Don't check for a null context in direct functionsChris Robinson2023-05-141-80/+9
|
* Implement direct functions for buffersChris Robinson2023-05-141-181/+178
|
* Implement direct functions for extension queries and EAXChris Robinson2023-05-141-2/+6
|
* Avoid using al::vector unnecessarilyChris Robinson2023-05-121-2/+3
|
* Special-case setting a single buffer's modeChris Robinson2023-05-111-9/+46
| | | | To avoid extraneous allocations and extra work for a common case.
* Avoid counting buffers multiple times in EAXSetBufferModeChris Robinson2023-05-101-29/+28
|
* Mark some functions noexcept when possibleChris Robinson2023-05-101-6/+2
|
* Use some more standard functionsChris Robinson2023-05-051-2/+2
|
* Use std::byte instead of a custom al::byteChris Robinson2023-05-041-7/+7
|
* Make and use a bit_cast functionChris Robinson2023-05-041-1/+1
| | | | Instead of reinterpret_casting between incompatible types
* Replace al::optional with std::optionalChris Robinson2023-05-041-10/+10
|
* Don't try to access null pointersChris Robinson2023-04-281-0/+3
|
* Make sure extension functions are properly aligned on 32-bitChris Robinson2023-04-121-2/+2
|
* Remove a duplicate functionChris Robinson2023-04-031-19/+3
|
* Support the AL_EXT_STATIC_BUFFER extensionChris Robinson2023-04-031-18/+144
|
* Hold the buffer sample pointer separate from the vectorChris Robinson2023-04-031-6/+8
|
* Remove the separate UserFmt typesChris Robinson2023-03-191-230/+128
| | | | | All caller-usable formats are available as core formats now, so there's no reason to distinguish between them.
* Support aLaw samples for UHJChris Robinson2023-03-071-1/+4
|
* Don't use "hardware" for automatic buffer storageChris Robinson2023-03-071-13/+30
|
* 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.
* Use macros for the likely/unlikely attributesChris Robinson2023-03-011-124/+124
| | | | | The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places.
* 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.
* 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-141-35/+6
|
* Support MSADPCM samples in the mixerChris Robinson2023-02-141-1/+3
|
* Don't convert IMA4 samples on loadChris Robinson2023-02-141-98/+96
|
* Support IMA4 ADPCM as a mixing voice formatChris Robinson2023-02-141-7/+7
|
* Separate decoding and mixing from resamplingChris Robinson2023-02-121-3/+9
|
* Avoid unnecessary uses of make_optionalChris Robinson2023-01-131-23/+23
|
* Avoid using a macro to set a context error and returnChris Robinson2022-12-241-17/+17
|
* Implement an al::unreachable wrapper/helperChris Robinson2022-12-131-2/+2
|
* Avoid using a macro to wrap standard attributesChris Robinson2022-12-061-124/+124
|
* Avoid some uses of the LIKELY/UNLIKELY macrosChris Robinson2022-12-051-125/+128
|
* Use standard likely/unlikely attributes when availableChris Robinson2022-12-051-2/+2
|
* Clear the buffer from X-RAM before updating its sizeChris Robinson2022-08-051-0/+3
|
* Move EAX files to their own sub-directoryChris Robinson2022-05-161-2/+2
|
* Remove the unused flags parameter from alBufferCallbackSOFTChris Robinson2022-04-011-3/+1
|
* Simplify al::byteChris Robinson2022-03-301-12/+10
| | | | | It's just an alias for unsigned char now, and no longer strongly-typed like std::byte.
* Ensure the EAX functions are suitably aligned on 32-bitChris Robinson2022-03-161-2/+2
|
* Fix X-RAM trackingChris Robinson2022-03-061-182/+115
|
* Make some local constexpr variables staticChris Robinson2022-02-231-1/+1
|
* Move ALSOFT_EAX definition to config.hChris Robinson2022-01-301-9/+6
| | | | And disable it by default for non-Windows targets
* Add EAX extensions (EAX 2.0-5.0, X-RAM) (#632)Boris I. Bendovsky2022-01-301-0/+292
| | | | | | | | | | | | | | | * Add EAX extensions (EAX 2.0-5.0, X-RAM) * Comment out C++17 leftovers * Remove everything related to patching * Update alsoftrc.sample * Rewrite integration * Fix GCC compilation under Linux * Always reset EAX effect properties when loading it into FX slot
* Properly compare the buffer channels for preservationChris Robinson2022-01-171-1/+1
|
* Add an internal Super Stereo formatChris Robinson2021-12-111-8/+4
| | | | | | | It's not available as an AL buffer format (yet) since I'm not sure how to expose it. Internally it seems fine as a separate channel configuration, but because OpenAL combines the channel configuration and sample type, a flag may work better there.
* Update some in-progress extension typesChris Robinson2021-11-101-2/+2
|