Call MixSource directly, instead of through a function pointer
This commit is contained in:
parent
30820c1bde
commit
e1c0b5ea24
@ -718,7 +718,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
|
|||||||
(*src)->NeedsUpdate = AL_FALSE;
|
(*src)->NeedsUpdate = AL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALsource_Mix(*src, device, SamplesToDo);
|
MixSource(*src, device, SamplesToDo);
|
||||||
src++;
|
src++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,13 +99,11 @@ typedef struct ALsource
|
|||||||
} Params;
|
} Params;
|
||||||
|
|
||||||
ALvoid (*Update)(struct ALsource *self, const ALCcontext *context);
|
ALvoid (*Update)(struct ALsource *self, const ALCcontext *context);
|
||||||
ALvoid (*Mix)(struct ALsource *self, ALCdevice *Device, ALuint SamplesToDo);
|
|
||||||
|
|
||||||
// Index to itself
|
// Index to itself
|
||||||
ALuint source;
|
ALuint source;
|
||||||
} ALsource;
|
} ALsource;
|
||||||
#define ALsource_Update(s,a) ((s)->Update(s,a))
|
#define ALsource_Update(s,a) ((s)->Update(s,a))
|
||||||
#define ALsource_Mix(s,a,b) ((s)->Mix(s,a,b))
|
|
||||||
|
|
||||||
ALvoid ReleaseALSources(ALCcontext *Context);
|
ALvoid ReleaseALSources(ALCcontext *Context);
|
||||||
|
|
||||||
|
@ -560,8 +560,6 @@ AL_API ALvoid AL_APIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue)
|
|||||||
else
|
else
|
||||||
Source->Update = CalcNonAttnSourceParams;
|
Source->Update = CalcNonAttnSourceParams;
|
||||||
|
|
||||||
Source->Mix = MixSource;
|
|
||||||
|
|
||||||
// Increment reference counter for buffer
|
// Increment reference counter for buffer
|
||||||
buffer->refcount++;
|
buffer->refcount++;
|
||||||
}
|
}
|
||||||
@ -1602,8 +1600,6 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei n, const A
|
|||||||
else
|
else
|
||||||
Source->Update = CalcNonAttnSourceParams;
|
Source->Update = CalcNonAttnSourceParams;
|
||||||
|
|
||||||
Source->Mix = MixSource;
|
|
||||||
|
|
||||||
Source->NeedsUpdate = AL_TRUE;
|
Source->NeedsUpdate = AL_TRUE;
|
||||||
}
|
}
|
||||||
else if(Frequency != buffer->frequency || Format != buffer->eOriginalFormat)
|
else if(Frequency != buffer->frequency || Format != buffer->eOriginalFormat)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user