From 0e2f4d381644e062b840ec27cecd18e43b0c94be Mon Sep 17 00:00:00 2001 From: Grissess Date: Sun, 14 Jun 2015 03:49:05 -0400 Subject: Silly bugfix --- client.py | 5 +++-- 1 file 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): -- cgit v1.2.3-70-g09d2