Add the SDL_mixer-based resampler as a compile-time alternative, which
can be chosen by setting `-DDXX_FEATURE_INTERNAL_RESAMPLER=0`. Keep the
new internal resampler as the default.
This is nullptr in all the cases that audio is disabled, and non-nullptr
in all the cases where it is enabled. Use it instead of a separate flag
variable.
This allows the compiler to see and perform basic checks on the call
even in builds with `DXX_WORDS_NEED_ALIGNMENT == 0`.
Also, fix a missing address-of operator in one invocation of
`align_polygon_model_data`.
Reported-by: Brunnis <https://github.com/dxx-rebirth/dxx-rebirth/issues/687> (missing address-of operator)
Fixes: 43e1c841f0 ("Pass polymodel& to polymodel_read")
This is initial setup to enabling use of zip() on sentinel based ranges.
Store the range's type in the zip signature, and store the types of
std::begin/std::end for the iterators, rather than assuming that
std::begin and std::end return the same type.
Allow the caller to pick which sequences can terminate the zip iterator.
For compatibility and performance, default to the historical behavior of
examining only the first sequence. The zip iteration terminates when
any of the examined sequences reaches its end, even if other sequences
have not reached their respective end.
The standard type imposes some additional requirements that are not
necessary here, but using this concept allows standard containers to be
classified correctly without specific overrides.
Any integer type can convert to match this signature, but the diagnostic
will only report that this deleted function was matched. Switch to a
template function so that the diagnostic can report the unconverted
integer type.
Switch from using a macro to capture __FILE__,__LINE__ to using
__builtin_FILE(),__builtin_LINE(). Make the event an explicit argument,
instead of assuming it is a variable named `event`. Move the
implementation out of line.
The global variables that control it configure the callback to do
nothing, but SDL_mixer would still call it and still acquire the SDL
mutex that protects the call. Such calls are a waste, so disable them.
This should also fix
<https://github.com/dxx-rebirth/dxx-rebirth/issues/684>, which appears
to be caused by the MVE mixer callback being run during gameplay, and
the callback not returning immediately. This is suspected to be because
a race condition between MVE_rmEndMovie and the callback caused the
global variables not to be placed in a state that causes the callback to
return immediately.