mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
wavesynth/Synthesizer: allow empty data
This commit is contained in:
parent
5b1165f413
commit
6b0e120d75
@ -9,6 +9,8 @@ class Spline:
|
||||
self.c = [0.0]
|
||||
|
||||
def set_coefficients(self, c):
|
||||
if not c:
|
||||
c = [0.]
|
||||
self.c = copy(c)
|
||||
discrete_compensate(self.c)
|
||||
|
||||
@ -25,6 +27,8 @@ class SplinePhase:
|
||||
self.c0 = 0.0
|
||||
|
||||
def set_coefficients(self, c):
|
||||
if not c:
|
||||
c = [0.]
|
||||
self.c0 = c[0]
|
||||
c1p = c[1:]
|
||||
discrete_compensate(c1p)
|
||||
|
Loading…
Reference in New Issue
Block a user