diff options
author | Grissess <grissess@nexusg.org> | 2015-06-14 03:49:05 -0400 |
---|---|---|
committer | Grissess <grissess@nexusg.org> | 2015-06-14 03:49:05 -0400 |
commit | 0e2f4d381644e062b840ec27cecd18e43b0c94be (patch) | |
tree | aaaa66b1857456d442bfc4458594bc951c2c00f0 | |
parent | af3e084f8f27f478d372d2906a05d9b289833cb4 (diff) |
Silly bugfix
-rw-r--r-- | client.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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): |