diff options
author | Chris Robinson <[email protected]> | 2014-06-13 11:42:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-06-13 11:42:04 -0700 |
commit | c29eb6348980bf101f2a043d3f3b017dc1c48538 (patch) | |
tree | 25686d7176248b3969759d005da6062abc59179e /OpenAL32/Include | |
parent | 19ec7b2ad241a7b4423cfa9df53e78f480ef9b5e (diff) |
Combine some dry and wet path types
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alSource.h | 4 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 21 |
2 files changed, 8 insertions, 17 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index f87f1672..fa73683c 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -33,10 +33,10 @@ typedef struct ALactivesource { /** Current target parameters used for mixing. */ ResamplerFunc Resample; union { - DryMixerFunc Mix; + MixerFunc Mix; HrtfMixerFunc HrtfMix; } Dry; - WetMixerFunc WetMix; + MixerFunc WetMix; ALboolean IsHrtf; ALint Step; diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index c4b4d674..7a6ddf08 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -63,16 +63,10 @@ typedef struct HrtfParams { typedef struct MixGains { - ALfloat Current[MaxChannels]; - ALfloat Step[MaxChannels]; - ALfloat Target[MaxChannels]; -} MixGains; - -typedef struct MixGainMono { ALfloat Current; ALfloat Step; ALfloat Target; -} MixGainMono; +} MixGains; typedef struct DirectParams { @@ -98,7 +92,7 @@ typedef struct DirectParams { ALfloat Dir[3]; } Hrtf; - MixGains Gains[MAX_INPUT_CHANNELS]; + MixGains Gains[MAX_INPUT_CHANNELS][MaxChannels]; } Mix; } DirectParams; @@ -116,23 +110,20 @@ typedef struct SendParams { /* Gain control, which applies to all input channels to a single (mono) * output buffer. */ - MixGainMono Gain; + MixGains Gain; } SendParams; typedef const ALfloat* (*ResamplerFunc)(const ALfloat *src, ALuint frac, ALuint increment, ALfloat *restrict dst, ALuint dstlen); -typedef void (*DryMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data, - MixGains *Gains, ALuint Counter, ALuint OutPos, - ALuint BufferSize); +typedef void (*MixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data, + MixGains *Gains, ALuint Counter, ALuint OutPos, + ALuint BufferSize); typedef void (*HrtfMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data, ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize, const HrtfParams *hrtfparams, HrtfState *hrtfstate, ALuint BufferSize); -typedef void (*WetMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data, - MixGainMono *Gain, ALuint Counter, ALuint OutPos, - ALuint BufferSize); #define GAIN_SILENCE_THRESHOLD (0.00001f) /* -100dB */ |