Skip to content

Commit

Permalink
wavesynth/Synthesizer: allow empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Jul 23, 2015
1 parent 5b1165f commit 6b0e120
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions artiq/wavesynth/compute_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def __init__(self):
self.c = [0.0]

def set_coefficients(self, c):
if not c:
c = [0.]
self.c = copy(c)
discrete_compensate(self.c)

Expand All @@ -25,6 +27,8 @@ def __init__(self):
self.c0 = 0.0

def set_coefficients(self, c):
if not c:
c = [0.]
self.c0 = c[0]
c1p = c[1:]
discrete_compensate(c1p)
Expand Down

0 comments on commit 6b0e120

Please sign in to comment.