20 Commits

Author SHA1 Message Date
Chris Robinson
1b03e21ca1 Avoid declaring some "C-style arrays" 2024-05-07 20:26:13 -07:00
Chris Robinson
ff1183fc0a Use spans a bit more in place of pointers 2024-03-19 23:38:48 -07:00
Chris Robinson
1fddc044ac Clean up some gotos and non-optimal casts 2023-12-26 02:21:35 -08:00
Chris Robinson
cfb6bdfabf Avoid assignments in if conditions 2023-12-23 04:18:07 -08:00
Chris Robinson
aa6e04a556 Ensure struct members are initialized 2023-12-20 01:53:27 -08:00
Chris Robinson
760ada93e8 Fix clang-tidy warnings from the examples and utilities 2023-12-13 22:18:09 -08:00
Chris Robinson
bb3387b0fc Much more clang-tidy cleanup 2023-12-10 22:15:17 -08:00
Chris Robinson
c679622010 Add missing include for examples to have a UTF-8 main 2023-12-06 21:43:07 -08:00
Chris Robinson
eca86489e4 Make the API functions noexcept
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.
2023-05-22 02:25:30 -07:00
Chris Robinson
28ec3afb79 Fix compiling examples with an older libsndfile
Which lack the SF_FORMAT_MPEG_LAYER_* enums.
2023-03-05 11:39:20 -08:00
Chris Robinson
442cfdd14e Make sure the fmt chunk is large enough 2023-03-05 00:29:24 -08:00
Chris Robinson
ef45eccd6c Remove a couple unused variables 2023-03-04 23:31:01 -08:00
Chris Robinson
08bfbaa533 Cleanup the examples' loading functions slightly 2023-02-17 11:45:33 -08:00
Chris Robinson
8b930f5d28 Handle Int16 and ADPCM formats in alstreamcb 2023-02-16 17:54:32 -08:00
Chris Robinson
f2f83aaabb Finalize AL_SOFT_callback_buffer 2022-04-01 19:31:22 -07:00
Chris Robinson
a731e042cc Remove the unused flags parameter from alBufferCallbackSOFT 2022-04-01 19:15:16 -07:00
Chris Robinson
f0726f471f Use float formats in examples/alstreamcb
libsndfile apparently has issues reading floating-point wave files as 16-bit
samples (produces silence). Even on other file formats, reading float samples
as integer samples has no over/underflow protection, so this is better for
those formats too.
2021-03-21 01:38:38 -07:00
Chris Robinson
04fd50bcdf Support B-Format sounds in the examples 2020-09-22 11:36:43 -07:00
Chris Robinson
cae78e79e8 Convert the examples from SDL_sound to libsndfile 2020-03-24 15:46:47 -07:00
Chris Robinson
642ef4edc9 Add a streaming example using a callback buffer 2020-02-20 17:53:09 -08:00