diff options
author | Chris Robinson <[email protected]> | 2017-04-10 09:17:10 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-10 09:26:06 -0700 |
commit | 6cc69c8d94744d66e68ffffb9b71f6714d86e710 (patch) | |
tree | 1fd85a1f2eb40e5383065560bb8d1a0de8df06ed /OpenAL32 | |
parent | 81527cdbddc52338f5fb3c8b79139bf9d9186d3a (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 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alu.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 * |