From c41e893361f4c912b8c6c4c703bf7590c957318d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 28 Nov 2010 12:53:35 -0800 Subject: Don't store the internal format in the buffer The type and channel config are good enough --- Alc/ALu.c | 8 ++++---- Alc/mixer.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Alc') diff --git a/Alc/ALu.c b/Alc/ALu.c index 400903ec..3a635826 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -114,8 +114,8 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALbuffer *ALBuffer; if((ALBuffer=BufferListItem->buffer) != NULL) { - ALint maxstep = STACK_DATA_SIZE / - aluFrameSizeFromFormat(ALBuffer->format); + ALint maxstep = STACK_DATA_SIZE / FrameSizeFromFmt(ALBuffer->FmtType, + ALBuffer->FmtChannels); maxstep -= ResamplerPadding[ALSource->Resampler] + ResamplerPrePadding[ALSource->Resampler] + 1; maxstep = min(maxstep, INT_MAX>>FRACTIONBITS); @@ -592,8 +592,8 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALbuffer *ALBuffer; if((ALBuffer=BufferListItem->buffer) != NULL) { - ALint maxstep = STACK_DATA_SIZE / - aluFrameSizeFromFormat(ALBuffer->format); + ALint maxstep = STACK_DATA_SIZE / FrameSizeFromFmt(ALBuffer->FmtType, + ALBuffer->FmtChannels); maxstep -= ResamplerPadding[ALSource->Resampler] + ResamplerPrePadding[ALSource->Resampler] + 1; maxstep = min(maxstep, INT_MAX>>FRACTIONBITS); diff --git a/Alc/mixer.c b/Alc/mixer.c index ecf3d062..76ae9d86 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -749,9 +749,9 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo) const ALbuffer *ALBuffer; if((ALBuffer=BufferListItem->buffer) != NULL) { - FrameSize = aluFrameSizeFromFormat(ALBuffer->format); FmtChannels = ALBuffer->FmtChannels; FmtType = ALBuffer->FmtType; + FrameSize = FrameSizeFromFmt(FmtType, FmtChannels); break; } BufferListItem = BufferListItem->next; -- cgit v1.2.3