summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Comstedt <marcus@mc.pp.se>2017-11-27 10:54:35 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2017-12-09 13:36:13 +0100
commit30c855f60df2ae5d2edc568c51920f215ab38e0c (patch)
tree44faefc0bfcef0496d5e35b4c9339563d1bf8805
parente0e7be8a2f9370032573bcb3b4e7f88b36a2ae2d (diff)
downloadlibsigrokdecode-30c855f60df2ae5d2edc568c51920f215ab38e0c.tar.gz
libsigrokdecode-30c855f60df2ae5d2edc568c51920f215ab38e0c.zip
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.
-rw-r--r--decoders/i2s/pd.py2
1 files changed, 1 insertions, 1 deletions
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('<I', self.data)
def decode(self):
if not self.samplerate: