aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrissess <grissess@nexusg.org>2015-06-14 03:49:05 -0400
committerGrissess <grissess@nexusg.org>2015-06-14 03:49:05 -0400
commit0e2f4d381644e062b840ec27cecd18e43b0c94be (patch)
treeaaaa66b1857456d442bfc4458594bc951c2c00f0
parentaf3e084f8f27f478d372d2906a05d9b289833cb4 (diff)
Silly bugfix
-rw-r--r--client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/client.py b/client.py
index d965cae..9ffb292 100644
--- a/client.py
+++ b/client.py
@@ -21,6 +21,7 @@ FPB = 64
Z_SAMP = '\x00\x00\x00\x00'
MAX = 0x7fffffff
+AMP = MAX
MIN = -0x80000000
def sigalrm(sig, frm):
@@ -36,10 +37,10 @@ def lin_interp(frm, to, cnt):
return samps
def sine(freq, phase, cnt):
- global RATE, MAX
+ global RATE, AMP
samps = [0]*cnt
for i in xrange(cnt):
- samps[i] = int(MAX * math.sin(phase + 2 * math.pi * freq * i / RATE))
+ samps[i] = int(AMP * math.sin(phase + 2 * math.pi * freq * i / RATE))
return samps, phase + 2 * math.pi * freq * cnt / RATE
def to_data(samps):