aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-28 12:53:35 -0800
committerChris Robinson <[email protected]>2010-11-28 12:53:35 -0800
commitc41e893361f4c912b8c6c4c703bf7590c957318d (patch)
treeddb037cd77a117c5c7d0ce2c3b31fbb8d992569d /Alc
parent2fd8d6916bae6b681f065e5dfe1f962641f41533 (diff)
Don't store the internal format in the buffer
The type and channel config are good enough
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c8
-rw-r--r--Alc/mixer.c2
2 files changed, 5 insertions, 5 deletions
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;