aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Clean up some more clang-tidy warningsChris Robinson2023-12-081-6/+6
|
* Try to work around a compiler issue with HexPrinterChris Robinson2023-12-081-6/+7
|
* Fix some clang-tidy warningsChris Robinson2023-12-081-13/+18
|
* Use RAII to handle writing under the mixer seqlockChris Robinson2023-12-041-3/+3
|
* Remove some unnecessary atomic wrappersChris Robinson2023-12-031-2/+3
|
* Replace a global function with a member functionChris Robinson2023-12-031-2/+2
|
* Make a couple global values/variables inlineChris Robinson2023-11-111-5/+3
|
* Remove an unnecessary deque with a custom allocatorChris Robinson2023-10-111-3/+3
|
* Don't inline a couple more template functionsChris Robinson2023-09-261-2/+2
| | | | | I still wish I didn't have to force noinline just to avoid template functions being more aggressively inlined.
* Avoid casting an integer literalChris Robinson2023-09-221-12/+17
|
* Fix source span sizeChris Robinson2023-09-171-5/+5
|
* Rename noinline to NOINLINEChris Robinson2023-09-171-2/+2
| | | | To avoid clashes with compilers that use it as a keyword already
* Don't inline some big functionsChris Robinson2023-09-161-40/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use duration_cast to convert nanoseconds to secondsChris Robinson2023-09-161-9/+14
|
* Add AL_EXT_debug functions to set/get object namesChris Robinson2023-08-111-0/+14
|
* Declare functions closer to where they're neededChris Robinson2023-07-261-40/+39
| | | | | This provides better code locality when calling implicit context functions that call their direct context variants.
* Fix some typos (#872)Dirk Stolle2023-07-041-3/+3
|
* Use cinttypes instead of inttypes.h in C++Chris Robinson2023-06-011-1/+1
|
* Rename threads.cpp/h to alsem.cpp/hChris Robinson2023-06-011-1/+0
|
* Make the API functions noexceptChris Robinson2023-05-221-15/+3
| | | | | | | | | | | 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-37/+37
|
* Don't check for a null context in direct functionsChris Robinson2023-05-141-115/+15
|
* Implement direct functions for sourcesChris Robinson2023-05-141-277/+272
|
* Avoid using al::vector unnecessarilyChris Robinson2023-05-121-6/+7
|
* Only check isfinite for floating point valuesChris Robinson2023-05-061-19/+28
|
* Improve accuracy for the source offset and length queriesChris Robinson2023-05-061-39/+63
|
* Combine multiple functions into reusable templatesChris Robinson2023-05-061-1139/+814
|
* Clean up some temporary variable namesChris Robinson2023-05-051-10/+3
|
* Use some more standard functionsChris Robinson2023-05-051-4/+4
|
* Replace al::optional with std::optionalChris Robinson2023-05-041-15/+15
|
* Don't try to access null pointersChris Robinson2023-04-281-0/+3
|
* Use std::transform to cast doubles to floatsChris Robinson2023-04-271-2/+4
|
* Make sure extension functions are properly aligned on 32-bitChris Robinson2023-04-121-2/+3
|
* Allow using a negative offset with callback buffersChris Robinson2023-03-281-1/+4
|
* Log the buffer format when queueing mismatched buffersChris Robinson2023-03-221-2/+6
|
* Remove the separate UserFmt typesChris Robinson2023-03-191-16/+3
| | | | | All caller-usable formats are available as core formats now, so there's no reason to distinguish between them.
* Simplify some samples-to-bytes conversionsChris Robinson2023-03-191-40/+8
|
* Add a compat option to restore AL_SOFT_buffer_sub_dataChris Robinson2023-03-171-10/+134
|
* Rename some member functions and variables for consistencyChris Robinson2023-03-161-102/+102
|
* Commit deferred EAX properties in alcProcessContextChris Robinson2023-03-161-15/+0
|
* Fix the format check for queueing buffersChris Robinson2023-03-151-1/+1
|
* Set a default version for EAX source propertiesChris Robinson2023-03-141-14/+15
|
* Don't allow queueing a buffer with no formatChris Robinson2023-03-121-10/+18
|
* Don't commit EAX updates in applyAllUpdatesChris Robinson2023-03-111-32/+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).
* 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-011-136/+136
| | | | | The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places.
* 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.