Move the active source's offset out of the direct params

This commit is contained in:
Chris Robinson 2014-05-24 16:55:10 -07:00
parent 13eac2552e
commit 4ca561acd3
3 changed files with 4 additions and 4 deletions

View File

@ -359,7 +359,7 @@ ALvoid MixSource(ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo)
parms->Counter, OutPos, DstBufferSize);
else
src->Dry.HrtfMix(
parms->OutBuffer, samples, parms->Counter, parms->Offset,
parms->OutBuffer, samples, parms->Counter, src->Offset,
OutPos, parms->Mix.Hrtf.IrSize, &parms->Mix.Hrtf.Params[chan],
&parms->Mix.Hrtf.State[chan], DstBufferSize
);
@ -390,7 +390,7 @@ ALvoid MixSource(ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo)
DataPosFrac &= FRACTIONMASK;
}
OutPos += DstBufferSize;
src->Direct.Offset += DstBufferSize;
src->Offset += DstBufferSize;
src->Direct.Counter = maxu(src->Direct.Counter, DstBufferSize) - DstBufferSize;
for(j = 0;j < Device->NumAuxSends;j++)
src->Send[j].Counter = maxu(src->Send[j].Counter, DstBufferSize) - DstBufferSize;

View File

@ -41,6 +41,8 @@ typedef struct ALactivesource {
ALboolean IsHrtf;
ALint Step;
ALuint Offset; /* Number of output samples mixed since starting. */
DirectParams Direct;
SendParams Send[MAX_SENDS];
} ALactivesource;

View File

@ -80,8 +80,6 @@ typedef struct DirectParams {
ALboolean Moving;
/* Stepping counter for gain/coefficient fading. */
ALuint Counter;
/* History/coefficient offset. */
ALuint Offset;
struct {
enum ActiveFilters ActiveType;