From 30c855f60df2ae5d2edc568c51920f215ab38e0c Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Mon, 27 Nov 2017 10:54:35 +0100 Subject: i2s: Fix unportable use of struct.pack Using the format string 'I' with the default (implied) prefix '@' results in both word size and endianness being platform dependent. In this case standard size (32 bits) and little endianness is required, so the prefix '<' needs to be used. --- decoders/i2s/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoders/i2s/pd.py b/decoders/i2s/pd.py index 0590797..beee079 100644 --- a/decoders/i2s/pd.py +++ b/decoders/i2s/pd.py @@ -122,7 +122,7 @@ class Decoder(srd.Decoder): return h def wav_sample(self, sample): - return struct.pack('I', self.data) + return struct.pack('