diff options
author | Chris Robinson <[email protected]> | 2012-02-15 11:28:19 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-15 11:28:19 -0800 |
commit | 425ff7cb00c3666e87ec5dbdbf3a65c9a77d9266 (patch) | |
tree | 94acd75c791315bc09b15ee52f7928520a8b4aee /Alc | |
parent | 1140b3ae837437966c9d2474fca8aa17d8193aa5 (diff) |
Combine a couple if checks
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1189,19 +1189,15 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) } device->Flags |= DEVICE_RUNNING; - if(device->FmtChans != oldChans) + if(device->FmtChans != oldChans && (device->Flags&DEVICE_CHANNELS_REQUEST)) { - if((device->Flags&DEVICE_CHANNELS_REQUEST)) - ERR("Failed to set %s, got %s instead\n", - DevFmtChannelsString(oldChans), - DevFmtChannelsString(device->FmtChans)); + ERR("Failed to set %s, got %s instead\n", DevFmtChannelsString(oldChans), + DevFmtChannelsString(device->FmtChans)); device->Flags &= ~DEVICE_CHANNELS_REQUEST; } - if(device->Frequency != oldFreq) + if(device->Frequency != oldFreq && (device->Flags&DEVICE_FREQUENCY_REQUEST)) { - if((device->Flags&DEVICE_FREQUENCY_REQUEST)) - ERR("Failed to set %uhz, got %uhz instead\n", - oldFreq, device->Frequency); + ERR("Failed to set %uhz, got %uhz instead\n", oldFreq, device->Frequency); device->Flags &= ~DEVICE_FREQUENCY_REQUEST; } |