From bab20d4625ddddad7911d548edca12cc0ea93c6b Mon Sep 17 00:00:00 2001 From: Grissess Date: Mon, 12 Sep 2016 11:52:50 -0400 Subject: DRUM SUPPORT! --- packet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet.py') diff --git a/packet.py b/packet.py index 414ed73..1291601 100644 --- a/packet.py +++ b/packet.py @@ -27,7 +27,7 @@ class CMD: PCM = 5 # 16 samples, encoded S16_LE def itos(i): - return struct.pack('>L', i) + return struct.pack('>L', i).rstrip('\0') def stoi(s): - return struct.unpack('>L', s)[0] + return struct.unpack('>L', s.ljust(4, '\0'))[0] -- cgit v1.2.3-70-g09d2