aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
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)