diff options
author | Chris Robinson <[email protected]> | 2008-01-25 16:38:37 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-01-25 16:38:37 -0800 |
commit | 5f1c0450b328f77d637690e2221a9de21d909811 (patch) | |
tree | ab1a73f46ecb814b21359995c511b53acaff751f /Alc/ALc.c | |
parent | 04b62f77e37335be68d3e8c04c2cc7a354aef18c (diff) |
Remove unnecessary Channels field
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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) |