aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Rename noinline to NOINLINEChris Robinson2023-09-171-3/+3
| | | | To avoid clashes with compilers that use it as a keyword already
* Don't inline some big functionsChris Robinson2023-09-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is very dumb. Template functions are implicitly marked inline according to C++, and contrary to popular belief, "inline" *does* influence the compiler's decision to inline a function. A function the compiler may not have decided to inline normally may be inlined anyway, or issue a warning if it still decides not to inline, if explicitly or implicitly marked as such (or does inline it as requested, but then decides to not inline different functions it normally would because of a cumulative code size increase or something). Furthermore, once a function becomes inline due to being a template function, there's no way to undo it. Marking an inline function "noinline" pushes the problem the other way, causing the compiler to not inline a function it may have decided was beneficial to inline. There's no way to declare a template function to be inlined based solely on compiler heuristics, it will always be influenced by the implicit "inline" or explicit "noinline". That's what's happening here. A number of functions had been combined into a smaller number of large-ish template functions to reduce code duplication and ease maintanence, causing them to be implicitly inline as a side-effect. GCC then manages to inline these larger functions as implicitly requested, but in doing so prevents other smaller functions (which are explicitly marked inline) from being inlined due to excessive code increase and issue a warning. The "noinline" is a heavy-handed method of un-pessimizing the optimization pass, on the assumption the compiler apparently doesn't actually want to inline the template functions, but does so because they're technically marked inline. There's no good option here until it gets acknowledged that inline does mean something beyond allowing multiple definitions, and that template (and other types of) function definitions sometimes (if not most often) want to allow multiple definitions but don't want an artificial/detrimental boost in inline prioritization. /rant
* Improve the FFT bit reversal computationChris Robinson2023-09-092-34/+43
| | | | | This also allows to include 11-bit indices in the fast lookup table path, without exceeding GCC's internal limit of compile-time calculations.
* Optimize FFT calculations for lengths of 1024 or lessChris Robinson2023-09-091-23/+64
| | | | | This replaces sin/cos calls with an array of 10 complex values for lookup tables, and separates the first loop iteration with a constant x1 multiplier.
* Use a bit_cast instead of a union for type-punningChris Robinson2023-08-251-31/+16
|
* Fix conversion and maybe-unused warnings with my_fopenChris Robinson2023-08-181-3/+10
|
* Use a string_view for the backend open methodChris Robinson2023-08-062-10/+12
|
* disable unavailable functionality on xbox (#887)Max Bachmann2023-07-261-0/+4
| | | | | * disable unavailable functionality on xbox * use not std version of getenv on xbox
* Rename threads.cpp/h to alsem.cpp/hChris Robinson2023-06-012-5/+6
|
* Move althrd_setname to its own sourceChris Robinson2023-06-014-68/+82
|
* Define FORCE_ALIGN in config.hChris Robinson2023-06-011-13/+0
|
* Fix ios crash at sem_init fail with errno=78(function not implemented) (#855)Deal(一线灵)2023-06-012-3/+5
|
* threads: do not use libdispatch where it is not present (#851)Sergey Fedorov2023-05-282-2/+8
| | | Fixes: https://github.com/kcat/openal-soft/issues/850
* Use [[maybe_unused]] instead of std::ignoreChris Robinson2023-05-271-12/+5
|
* Update and clarify a commentChris Robinson2023-05-261-4/+7
|
* Be a bit more safe with type manglingChris Robinson2023-05-241-3/+4
|
* Mark some global constexpr variables inlineChris Robinson2023-05-071-8/+8
|
* Use some more standard functionsChris Robinson2023-05-052-74/+3
|
* Use deduction guides instead of helper functions for spansChris Robinson2023-05-052-28/+22
|
* Remove custom stuff for standardChris Robinson2023-05-043-56/+31
|
* Use std::byte instead of a custom al::byteChris Robinson2023-05-043-80/+61
|
* Make and use a bit_cast functionChris Robinson2023-05-042-1/+13
| | | | Instead of reinterpret_casting between incompatible types
* Update ComPtr and use an out_ptr() functionChris Robinson2023-05-041-26/+69
|
* Replace al::optional with std::optionalChris Robinson2023-05-043-25/+7
|
* Use std::optional instead of a custom implementationChris Robinson2023-05-041-340/+4
|
* Use a macro for when __has_cpp_attribute is unsupportedChris Robinson2023-03-101-4/+10
| | | | And the standard macro is __has_cpp_attribute, not __has_attribute.
* Use macros for the likely/unlikely attributesChris Robinson2023-03-016-17/+28
| | | | | The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places.
* Remove a [[likely]] that confuses some versions of GCCChris Robinson2023-02-281-1/+1
|
* Support IMA4 ADPCM as a mixing voice formatChris Robinson2023-02-143-13/+30
|
* Avoid using auto for lambda parametersChris Robinson2023-02-061-1/+1
|
* Don't try to use std::pointer_traits::to_addressChris Robinson2023-01-301-21/+2
|
* Try to fix has_to_addressChris Robinson2023-01-301-3/+7
|
* Don't pass an unnecessarily large alignment to allocator::rebindChris Robinson2023-01-301-2/+4
|
* Use std::pointer_traits::to_address when availableChris Robinson2023-01-291-1/+16
|
* Change the IS_VALID_CONTAINER macro to a constexpr boolChris Robinson2023-01-291-11/+11
|
* Avoid using to_address on an end iteratorChris Robinson2023-01-291-4/+3
|
* Precalculate reused scale factorsChris Robinson2023-01-151-1/+1
|
* 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]>
* Ensure the mixer helpers are properly inlinedChris Robinson2023-01-131-1/+1
|
* Avoid unnecessary uses of make_optionalChris Robinson2023-01-131-2/+2
|
* Simplify void_tChris Robinson2023-01-081-3/+1
|
* Handle UHJ better with convolution reverbChris Robinson2023-01-011-0/+2
| | | | | | It's now decoded to B-Format while being FFT'd, and processed as B-Format. Again, not that UHJ should really ever be used for convolution, but it's a valid format someone may want to use despite the overhead from converting it.
* Avoid unreachable() in assume_alignedChris Robinson2022-12-181-4/+6
| | | | | Another test to attempt to workaround MSVC build problems. Also, don't assume bit-wise value alignment for pointers as a default fallback.
* Revert "Change the order of compiler checks in assume_aligned"Chris Robinson2022-12-181-7/+5
| | | | This reverts commit 14d7809a89ea51ca663a7ebf09e7bc135b904d5d.
* Change the order of compiler checks in assume_alignedChris Robinson2022-12-181-5/+7
| | | | Testing to see if this works around issues with MSVC builds
* Better handle span sources from iteratorsChris Robinson2022-12-144-26/+73
|
* Avoid manually specifying FFT template parametersChris Robinson2022-12-143-19/+40
|
* Implement an al::unreachable wrapper/helperChris Robinson2022-12-131-8/+19
|
* Rename a potentially confusing member functionChris Robinson2022-12-081-6/+6
|
* Avoid using a macro to wrap standard attributesChris Robinson2022-12-066-26/+18
|