aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2005-05-08 21:49:52 +0000
committerMax Horn2005-05-08 21:49:52 +0000
commitcca744f69a9eb079a314c8f39af1faa4e7b1e5a6 (patch)
tree1eb00deac3941d844ce98abc10eb4339955ef61d /sound
parent013e30eb389c40eb579cc8e3f05b8e8da80925ca (diff)
downloadscummvm-rg350-cca744f69a9eb079a314c8f39af1faa4e7b1e5a6.tar.gz
scummvm-rg350-cca744f69a9eb079a314c8f39af1faa4e7b1e5a6.tar.bz2
scummvm-rg350-cca744f69a9eb079a314c8f39af1faa4e7b1e5a6.zip
Comply to our coding conventions
svn-id: r17975
Diffstat (limited to 'sound')
-rw-r--r--sound/adpcm.cpp16
-rw-r--r--sound/mixer.cpp2
-rw-r--r--sound/softsynth/mt32/freeverb.cpp2
-rw-r--r--sound/softsynth/mt32/partial.cpp4
-rw-r--r--sound/softsynth/mt32/tables.cpp6
5 files changed, 15 insertions, 15 deletions
diff --git a/sound/adpcm.cpp b/sound/adpcm.cpp
index 9df92fa680..b20285a795 100644
--- a/sound/adpcm.cpp
+++ b/sound/adpcm.cpp
@@ -148,16 +148,16 @@ int16 ADPCMInputStream::okiADPCMDecode(byte code) {
samp = _status.last + diff;
// Clip the values to +/- 2^11 (supposed to be 12 bits)
- if(samp > 2048)
+ if (samp > 2048)
samp = 2048;
- if(samp < -2048)
+ if (samp < -2048)
samp = -2048;
_status.last = samp;
_status.stepIndex += stepAdjust(code);
- if(_status.stepIndex < 0)
+ if (_status.stepIndex < 0)
_status.stepIndex = 0;
- if(_status.stepIndex > 48)
+ if (_status.stepIndex > 48)
_status.stepIndex = 48;
return samp;
@@ -200,16 +200,16 @@ int16 ADPCMInputStream::imaADPCMDecode(byte code) {
diff = (code & 0x08) ? -E : E;
samp = _status.last + diff;
- if(samp < -32768)
+ if (samp < -32768)
samp = -32768;
- else if(samp > 32767)
+ else if (samp > 32767)
samp = 32767;
_status.last = samp;
_status.stepIndex += stepAdjust(code);
- if(_status.stepIndex < 0)
+ if (_status.stepIndex < 0)
_status.stepIndex = 0;
- if(_status.stepIndex > 88)
+ if (_status.stepIndex > 88)
_status.stepIndex = 88;
return samp;
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 5face1f8a9..18b55746cf 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -159,7 +159,7 @@ void SoundMixer::insertChannel(SoundHandle *handle, Channel *chan) {
break;
}
}
- if(index == -1) {
+ if (index == -1) {
warning("SoundMixer::out of mixer slots");
delete chan;
return;
diff --git a/sound/softsynth/mt32/freeverb.cpp b/sound/softsynth/mt32/freeverb.cpp
index 250be0eb5e..46193a5f4b 100644
--- a/sound/softsynth/mt32/freeverb.cpp
+++ b/sound/softsynth/mt32/freeverb.cpp
@@ -158,7 +158,7 @@ void revmodel::mute() {
void revmodel::processreplace(float *inputL, float *inputR, float *outputL, float *outputR, long numsamples, int skip) {
float outL, outR, input;
- while(numsamples-- > 0) {
+ while (numsamples-- > 0) {
int i;
outL = outR = 0;
diff --git a/sound/softsynth/mt32/partial.cpp b/sound/softsynth/mt32/partial.cpp
index 4cbe4e015c..e7e7af2a7f 100644
--- a/sound/softsynth/mt32/partial.cpp
+++ b/sound/softsynth/mt32/partial.cpp
@@ -669,9 +669,9 @@ Bit32s Partial::getFiltEnvelope() {
tStat->envsize = synth->tables.envTime[(int)patchCache->filtEnv.envtime[tStat->envstat]];
} else {
Bit32u envTime = (int)patchCache->filtEnv.envtime[tStat->envstat];
- if(tStat->envstat > 1) {
+ if (tStat->envstat > 1) {
int envDiff = abs(patchCache->filtEnv.envlevel[tStat->envstat] - patchCache->filtEnv.envlevel[tStat->envstat - 1]);
- if(envTime > synth->tables.envDeltaMaxTime[envDiff]) {
+ if (envTime > synth->tables.envDeltaMaxTime[envDiff]) {
envTime = synth->tables.envDeltaMaxTime[envDiff];
}
}
diff --git a/sound/softsynth/mt32/tables.cpp b/sound/softsynth/mt32/tables.cpp
index 0acaa51df8..35b1672d40 100644
--- a/sound/softsynth/mt32/tables.cpp
+++ b/sound/softsynth/mt32/tables.cpp
@@ -161,11 +161,11 @@ void Tables::initEnvelopes(float samplerate) {
envTime[lf] = samples;
// Cap on envelope times depending on the level delta
- if(elf == 0) {
+ if (elf == 0) {
envDeltaMaxTime[lf] = 63;
} else {
float cap = 11 * log(elf) + 64;
- if(cap > 100.0f) {
+ if (cap > 100.0f) {
cap = 100.0f;
}
envDeltaMaxTime[lf] = (int)cap;
@@ -380,7 +380,7 @@ void Tables::initMT32ConstantTables(Synth *synth) {
// Distance of full volume reduction
amplog = (float)(12.0f / (float)lf) * 24.0f;
- if(distval > amplog) {
+ if (distval > amplog) {
tvaBiasMult[lf][distval] = 0;
} else {
dval = (amplog - (float)distval) / amplog;