aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-10 09:17:10 -0700
committerChris Robinson <[email protected]>2017-04-10 09:26:06 -0700
commit6cc69c8d94744d66e68ffffb9b71f6714d86e710 (patch)
tree1fd85a1f2eb40e5383065560bb8d1a0de8df06ed /Alc/mixer.c
parent81527cdbddc52338f5fb3c8b79139bf9d9186d3a (diff)
Add a sample converter
This is intended to do conversions for interleaved samples, and supports changing from one DevFmtType to another as well as resampling. It does not handle remixing channels. The mixer is more optimized to use the resampling functions directly. However, this should prove useful for recording with certain backends that won't do the conversion themselves.
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 2a30e323..90f3e05e 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -44,15 +44,6 @@ static_assert((INT_MAX>>FRACTIONBITS)/MAX_PITCH > BUFFERSIZE,
extern inline void InitiatePositionArrays(ALsizei frac, ALint increment, ALsizei *restrict frac_arr, ALint *restrict pos_arr, ALsizei size);
-enum Resampler {
- PointResampler,
- LinearResampler,
- FIR4Resampler,
- BSincResampler,
-
- ResamplerDefault = LinearResampler
-};
-
/* BSinc requires up to 11 extra samples before the current position, and 12 after. */
static_assert(MAX_PRE_SAMPLES >= 11, "MAX_PRE_SAMPLES must be at least 11!");
static_assert(MAX_POST_SAMPLES >= 12, "MAX_POST_SAMPLES must be at least 12!");
@@ -103,7 +94,7 @@ static inline HrtfMixerFunc SelectHrtfMixer(void)
return MixHrtf_C;
}
-static inline ResamplerFunc SelectResampler(enum Resampler resampler)
+ResamplerFunc SelectResampler(enum Resampler resampler)
{
switch(resampler)
{