aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/dcc/adpcmcodec.cpp
diff options
context:
space:
mode:
authorGravatar Robert Förster2009-09-01 22:12:36 +0000
committerGravatar Robert Förster2009-09-01 22:12:36 +0000
commitea06d9bbbd8d8ef75034bfc3f62838f193537984 (patch)
treea437eeabaa4b3d09f3313a6b0dd07b5bb961749d /src/modules/dcc/adpcmcodec.cpp
parentupdated splash screen (diff)
downloadKVIrc-ea06d9bbbd8d8ef75034bfc3f62838f193537984.tar.gz
KVIrc-ea06d9bbbd8d8ef75034bfc3f62838f193537984.tar.bz2
KVIrc-ea06d9bbbd8d8ef75034bfc3f62838f193537984.zip
- trailing whitespace cleanups all over the place
- removed charset dependent manpages since it really makes no sense to distribute them, they are getting installed in non standard places and one manpage per language is enough - added SpotChat to the serverdb, happens to be my network anyway :P (someone should remind me to check all the networks and servers there so we can do a cleanup if needed git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3463 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/dcc/adpcmcodec.cpp')
-rw-r--r--src/modules/dcc/adpcmcodec.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/dcc/adpcmcodec.cpp b/src/modules/dcc/adpcmcodec.cpp
index 1afff6ebc..28f35f948 100644
--- a/src/modules/dcc/adpcmcodec.cpp
+++ b/src/modules/dcc/adpcmcodec.cpp
@@ -25,10 +25,10 @@
// Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The Netherlands.
// All Rights Reserved
//
-// Permission to use, copy, modify, and distribute this software and its
-// documentation for any purpose and without fee is hereby granted,
+// Permission to use, copy, modify, and distribute this software and its
+// documentation for any purpose and without fee is hereby granted,
// provided that the above copyright notice appear in all copies and that
-// both that copyright notice and this permission notice appear in
+// both that copyright notice and this permission notice appear in
// supporting documentation, and that the names of Stichting Mathematisch
// Centrum or CWI not be used in advertising or publicity pertaining to
// distribution of the software without specific, written prior permission.
@@ -97,10 +97,10 @@ void ADPCM_compress(short indata[],char outdata[],int len,ADPCM_state *state)
int index; /* Current step change index */
int outputbuffer = 0; /* place to keep previous 4-bit value */
int bufferstep; /* toggle between outputbuffer/output */
-
+
lpOut = (signed char *)outdata;
lpIn = indata;
-
+
valpred = state->valprev;
index = state->index;
step = stepsizeTable[index];
@@ -113,7 +113,7 @@ void ADPCM_compress(short indata[],char outdata[],int len,ADPCM_state *state)
diff = val - valpred;
sign = (diff < 0) ? 8 : 0;
if(sign)diff=(-diff);
- // Step 2 - Divide and clamp
+ // Step 2 - Divide and clamp
// Note:
// This code *approximately* computes:
// delta = diff*4/step;
@@ -147,7 +147,7 @@ void ADPCM_compress(short indata[],char outdata[],int len,ADPCM_state *state)
if ( valpred > 32767 )valpred = 32767;
else if ( valpred < -32768 )valpred = -32768;
// Step 5 - Assemble value, update index and step values
- delta |= sign;
+ delta |= sign;
index += indexTable[delta];
if ( index < 0 ) index = 0;
if ( index > 88 ) index = 88;
@@ -175,10 +175,10 @@ void ADPCM_uncompress(char indata[],short outdata[],int len,ADPCM_state *state)
int index; /* Current step change index */
int inputbuffer=0; /* place to keep next 4-bit value */
int bufferstep; /* toggle between inputbuffer/input */
-
+
outp = outdata;
inp = (signed char *)indata;
-
+
valpred = state->valprev;
index = state->index;
step = stepsizeTable[index];
@@ -226,7 +226,7 @@ void ADPCM_uncompress(char indata[],short outdata[],int len,ADPCM_state *state)
/* Step 7 - Output value */
*outp++ = valpred;
}
-
+
state->valprev = valpred;
state->index = index;
}