From: jweigele Date: Thu, 29 Sep 2022 22:20:20 +0000 (-0700) Subject: Bugfix, actually explode the array for proper struct encoding X-Git-Url: http://git.hexthepla.net/?a=commitdiff_plain;h=461d0e5aaf963de822e22611683e43d1a7b4fcdc;p=grahbot Bugfix, actually explode the array for proper struct encoding --- diff --git a/ffmpegfile.py b/ffmpegfile.py index b77948b..4bfe8d7 100644 --- a/ffmpegfile.py +++ b/ffmpegfile.py @@ -49,7 +49,8 @@ class AudioChunk(object): #log.debug(list(self.samples)) next_samples = 32768.0 * self.samples next_bytes = next_samples.astype('int16') - return struct.pack('<'+'h'*self.samples.size, next_bytes) + retval = struct.pack('<'+'h'*len(next_bytes), *list(next_bytes)) + return retval @property def length(self):