aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-25 16:38:37 -0800
committerChris Robinson <[email protected]>2008-01-25 16:38:37 -0800
commit5f1c0450b328f77d637690e2221a9de21d909811 (patch)
treeab1a73f46ecb814b21359995c511b53acaff751f /Alc/ALc.c
parent04b62f77e37335be68d3e8c04c2cc7a354aef18c (diff)
Remove unnecessary Channels field
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index bca519e2..b485ec2e 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -430,9 +430,8 @@ ALCAPI ALCdevice* ALCAPIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, AL
pDevice->Frequency = frequency;
pDevice->Format = format;
- pDevice->Channels = aluChannelsFromFormat(format);
pDevice->FrameSize = aluBytesFromFormat(format) *
- pDevice->Channels;
+ aluChannelsFromFormat(format);
for(i = 0;BackendList[i].Init;i++)
{
@@ -1141,16 +1140,14 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName)
if(fmt[0])
device->Format = alGetEnumValue(fmt);
- device->Channels = aluChannelsFromFormat(device->Format);
- if(!device->Channels)
+ if(!aluChannelsFromFormat(device->Format))
{
device->Format = AL_FORMAT_STEREO16;
- device->Channels = 2;
device->FrameSize = 4;
}
else
device->FrameSize = aluBytesFromFormat(device->Format) *
- device->Channels;
+ aluChannelsFromFormat(device->Format);
device->UpdateFreq = GetConfigValueInt(NULL, "refresh", 8192);
if((ALint)device->UpdateFreq <= 0)