summaryrefslogtreecommitdiffstats
path: root/Modules/audioop.c
diff options
context:
space:
mode:
authorPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 17:15:07 (GMT)
committerPeter Schneider-Kamp <nowonder@nowonder.de>2000-07-10 17:15:07 (GMT)
commit8bc8f0d036a8257267fe9dc621b3d0861ab9d17d (patch)
treef771e3de5f189f382906d46900262d0b1359fb11 /Modules/audioop.c
parent3646366f4cbca51f0654184a59aa9b35f10604ce (diff)
downloadcpython-8bc8f0d036a8257267fe9dc621b3d0861ab9d17d.zip
cpython-8bc8f0d036a8257267fe9dc621b3d0861ab9d17d.tar.gz
cpython-8bc8f0d036a8257267fe9dc621b3d0861ab9d17d.tar.bz2
ANSI-fication
Diffstat (limited to 'Modules/audioop.c')
-rw-r--r--Modules/audioop.c96
1 files changed, 24 insertions, 72 deletions
diff --git a/Modules/audioop.c b/Modules/audioop.c
index cc5634d..73612cb 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -26,7 +26,6 @@ typedef unsigned long Py_UInt32;
#if defined(__CHAR_UNSIGNED__)
#if defined(signed)
-!ERROR!; READ THE SOURCE FILE!;
/* This module currently does not work on systems where only unsigned
characters are available. Take it out of Setup. Sorry. */
#endif
@@ -95,8 +94,7 @@ static int ulaw_table[256] = {
#define CLIP 32635
static unsigned char
-st_linear_to_ulaw( sample )
- int sample;
+st_linear_to_ulaw(int sample)
{
static int exp_lut[256] = {0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
@@ -162,9 +160,7 @@ static int stepsizeTable[89] = {
static PyObject *AudioopError;
static PyObject *
-audioop_getsample(self, args)
- PyObject *self;
- PyObject *args;
+audioop_getsample(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0;
@@ -187,9 +183,7 @@ audioop_getsample(self, args)
}
static PyObject *
-audioop_max(self, args)
- PyObject *self;
- PyObject *args;
+audioop_max(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0;
@@ -213,9 +207,7 @@ audioop_max(self, args)
}
static PyObject *
-audioop_minmax(self, args)
- PyObject *self;
- PyObject *args;
+audioop_minmax(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0;
@@ -239,9 +231,7 @@ audioop_minmax(self, args)
}
static PyObject *
-audioop_avg(self, args)
- PyObject *self;
- PyObject *args;
+audioop_avg(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0;
@@ -268,9 +258,7 @@ audioop_avg(self, args)
}
static PyObject *
-audioop_rms(self, args)
- PyObject *self;
- PyObject *args;
+audioop_rms(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0;
@@ -343,9 +331,7 @@ static double _sum2(a, b, len)
** is completely recalculated each step.
*/
static PyObject *
-audioop_findfit(self, args)
- PyObject *self;
- PyObject *args;
+audioop_findfit(PyObject *self, PyObject *args)
{
short *cp1, *cp2;
int len1, len2;
@@ -403,9 +389,7 @@ audioop_findfit(self, args)
** See the comment for findfit for details.
*/
static PyObject *
-audioop_findfactor(self, args)
- PyObject *self;
- PyObject *args;
+audioop_findfactor(PyObject *self, PyObject *args)
{
short *cp1, *cp2;
int len1, len2;
@@ -435,9 +419,7 @@ audioop_findfactor(self, args)
** that contains the most energy.
*/
static PyObject *
-audioop_findmax(self, args)
- PyObject *self;
- PyObject *args;
+audioop_findmax(PyObject *self, PyObject *args)
{
short *cp1;
int len1, len2;
@@ -481,9 +463,7 @@ audioop_findmax(self, args)
}
static PyObject *
-audioop_avgpp(self, args)
- PyObject *self;
- PyObject *args;
+audioop_avgpp(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0, prevval = 0, prevextremevalid = 0,
@@ -540,9 +520,7 @@ audioop_avgpp(self, args)
}
static PyObject *
-audioop_maxpp(self, args)
- PyObject *self;
- PyObject *args;
+audioop_maxpp(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0, prevval = 0, prevextremevalid = 0,
@@ -595,9 +573,7 @@ audioop_maxpp(self, args)
}
static PyObject *
-audioop_cross(self, args)
- PyObject *self;
- PyObject *args;
+audioop_cross(PyObject *self, PyObject *args)
{
signed char *cp;
int len, size, val = 0;
@@ -624,9 +600,7 @@ audioop_cross(self, args)
}
static PyObject *
-audioop_mul(self, args)
- PyObject *self;
- PyObject *args;
+audioop_mul(PyObject *self, PyObject *args)
{
signed char *cp, *ncp;
int len, size, val = 0;
@@ -667,9 +641,7 @@ audioop_mul(self, args)
}
static PyObject *
-audioop_tomono(self, args)
- PyObject *self;
- PyObject *args;
+audioop_tomono(PyObject *self, PyObject *args)
{
signed char *cp, *ncp;
int len, size, val1 = 0, val2 = 0;
@@ -713,9 +685,7 @@ audioop_tomono(self, args)
}
static PyObject *
-audioop_tostereo(self, args)
- PyObject *self;
- PyObject *args;
+audioop_tostereo(PyObject *self, PyObject *args)
{
signed char *cp, *ncp;
int len, size, val1, val2, val = 0;
@@ -767,9 +737,7 @@ audioop_tostereo(self, args)
}
static PyObject *
-audioop_add(self, args)
- PyObject *self;
- PyObject *args;
+audioop_add(PyObject *self, PyObject *args)
{
signed char *cp1, *cp2, *ncp;
int len1, len2, size, val1 = 0, val2 = 0, maxval, newval;
@@ -822,9 +790,7 @@ audioop_add(self, args)
}
static PyObject *
-audioop_bias(self, args)
- PyObject *self;
- PyObject *args;
+audioop_bias(PyObject *self, PyObject *args)
{
signed char *cp, *ncp;
int len, size, val = 0;
@@ -860,9 +826,7 @@ audioop_bias(self, args)
}
static PyObject *
-audioop_reverse(self, args)
- PyObject *self;
- PyObject *args;
+audioop_reverse(PyObject *self, PyObject *args)
{
signed char *cp;
unsigned char *ncp;
@@ -899,9 +863,7 @@ audioop_reverse(self, args)
}
static PyObject *
-audioop_lin2lin(self, args)
- PyObject *self;
- PyObject *args;
+audioop_lin2lin(PyObject *self, PyObject *args)
{
signed char *cp;
unsigned char *ncp;
@@ -949,9 +911,7 @@ gcd(a, b)
}
static PyObject *
-audioop_ratecv(self, args)
- PyObject *self;
- PyObject *args;
+audioop_ratecv(PyObject *self, PyObject *args)
{
char *cp, *ncp;
int len, size, nchannels, inrate, outrate, weightA, weightB;
@@ -1090,9 +1050,7 @@ audioop_ratecv(self, args)
}
static PyObject *
-audioop_lin2ulaw(self, args)
- PyObject *self;
- PyObject *args;
+audioop_lin2ulaw(PyObject *self, PyObject *args)
{
signed char *cp;
unsigned char *ncp;
@@ -1125,9 +1083,7 @@ audioop_lin2ulaw(self, args)
}
static PyObject *
-audioop_ulaw2lin(self, args)
- PyObject *self;
- PyObject *args;
+audioop_ulaw2lin(PyObject *self, PyObject *args)
{
unsigned char *cp;
unsigned char cval;
@@ -1162,9 +1118,7 @@ audioop_ulaw2lin(self, args)
}
static PyObject *
-audioop_lin2adpcm(self, args)
- PyObject *self;
- PyObject *args;
+audioop_lin2adpcm(PyObject *self, PyObject *args)
{
signed char *cp;
signed char *ncp;
@@ -1273,9 +1227,7 @@ audioop_lin2adpcm(self, args)
}
static PyObject *
-audioop_adpcm2lin(self, args)
- PyObject *self;
- PyObject *args;
+audioop_adpcm2lin(PyObject *self, PyObject *args)
{
signed char *cp;
signed char *ncp;