##// END OF EJS Templates
Better error when rate is not specified.
Matan Gover -
Show More
@@ -97,6 +97,8 b' class Audio(DisplayObject):'
97 97 super(Audio, self).__init__(data=data, url=url, filename=filename)
98 98
99 99 if self.data is not None and not isinstance(self.data, bytes):
100 if rate is None:
101 raise ValueError("rate must be specified when data is a numpy array or list of audio samples.")
100 102 self.data = Audio._make_wav(data, rate)
101 103
102 104 def reload(self):
General Comments 0
You need to be logged in to leave comments. Login now