From 6cc69c8d94744d66e68ffffb9b71f6714d86e710 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 10 Apr 2017 09:17:10 -0700 Subject: 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. --- OpenAL32/Include/alu.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 4d0ee196..51c43d85 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -302,6 +302,15 @@ inline ALfloat resample_fir4(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat v } +enum Resampler { + PointResampler, + LinearResampler, + FIR4Resampler, + BSincResampler, + + ResamplerDefault = LinearResampler +}; + enum HrtfRequestMode { Hrtf_Default = 0, Hrtf_Enable = 1, @@ -313,6 +322,7 @@ void aluInitMixer(void); MixerFunc SelectMixer(void); RowMixerFunc SelectRowMixer(void); +ResamplerFunc SelectResampler(enum Resampler resampler); /* aluInitRenderer * -- cgit v1.2.3