diff options
-rw-r--r-- | Alc/mixer.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index 35848a19..7f64bad9 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -75,8 +75,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac) #define DO_MIX_MONO(data,sampler) do { \ ALfloat (*DryBuffer)[OUTPUTCHANNELS]; \ ALfloat *ClickRemoval, *PendingClicks; \ - ALuint pos = DataPosInt; \ - ALuint frac = DataPosFrac; \ + ALuint pos, frac; \ ALfloat DrySend[OUTPUTCHANNELS]; \ FILTER *DryFilter; \ ALuint BufferIdx; \ @@ -90,6 +89,9 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac) for(i = 0;i < OUTPUTCHANNELS;i++) \ DrySend[i] = Source->Params.DryGains[i]; \ \ + pos = DataPosInt; \ + frac = DataPosFrac; \ + \ if(j == 0) \ { \ value = sampler(data[pos], data[pos+1], frac); \ @@ -221,8 +223,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac) const ALfloat scaler = 1.0f/Channels; \ ALfloat (*DryBuffer)[OUTPUTCHANNELS]; \ ALfloat *ClickRemoval, *PendingClicks; \ - ALuint pos = DataPosInt; \ - ALuint frac = DataPosFrac; \ + ALuint pos, frac; \ ALfloat DrySend[OUTPUTCHANNELS]; \ FILTER *DryFilter; \ ALuint BufferIdx; \ @@ -236,6 +237,9 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac) for(i = 0;i < OUTPUTCHANNELS;i++) \ DrySend[i] = Source->Params.DryGains[i]; \ \ + pos = DataPosInt; \ + frac = DataPosFrac; \ + \ if(j == 0) \ { \ for(i = 0;i < Channels;i++) \ @@ -372,8 +376,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac) const ALfloat scaler = 1.0f/Channels; \ ALfloat (*DryBuffer)[OUTPUTCHANNELS]; \ ALfloat *ClickRemoval, *PendingClicks; \ - ALuint pos = DataPosInt; \ - ALuint frac = DataPosFrac; \ + ALuint pos, frac; \ ALfloat DrySend[OUTPUTCHANNELS]; \ FILTER *DryFilter; \ ALuint BufferIdx; \ @@ -387,6 +390,9 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac) for(i = 0;i < OUTPUTCHANNELS;i++) \ DrySend[i] = Source->Params.DryGains[i]; \ \ + pos = DataPosInt; \ + frac = DataPosFrac; \ + \ if(j == 0) \ { \ for(i = 0;i < Channels;i++) \ |