diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2013-10-13 18:32:52 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2013-10-13 18:32:52 +0200 |
commit | 6fd278bac7d10e967e708171e2b3aa8b3382a2ff (patch) | |
tree | 753874db0fe643381624303c5c08251e4676f5b2 | |
parent | f54ffe555c7be3cc674833953fd5d8aba1a88e17 (diff) | |
download | libsigrokdecode-6fd278bac7d10e967e708171e2b3aa8b3382a2ff.tar.gz libsigrokdecode-6fd278bac7d10e967e708171e2b3aa8b3382a2ff.zip |
i2s_dump: Fix bug in the WAV output format generation.
-rw-r--r-- | decoders/i2s_dump/pd.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/decoders/i2s_dump/pd.py b/decoders/i2s_dump/pd.py index 8f95a86..54aee86 100644 --- a/decoders/i2s_dump/pd.py +++ b/decoders/i2s_dump/pd.py @@ -71,8 +71,8 @@ class Decoder(srd.Decoder): self.f.write(b'\x10\x00\x00\x00') # Subchunk size (16 bytes) self.f.write(b'\x01\x00') # Audio format (0x0001 == PCM) self.f.write(b'\x02\x00') # Number of channels (2) - self.f.write(b'\x44\xac\x00\x00') # Samplerate (44100) - self.f.write(b'\x88\x58\x01\x00') # Byterate (88200) TODO + self.f.write(b'\x80\x3e\x00\x00') # Samplerate (16000) + self.f.write(b'\x00\x7d\x00\x00') # Byterate (32000) self.f.write(b'\x04\x00') # Blockalign (4) self.f.write(b'\x10\x00') # Bits per sample (16) @@ -102,6 +102,6 @@ class Decoder(srd.Decoder): if s >= 0x8000: s -= 0x10000 lo, hi = s & 0xff, (s >> 8) & 0xff - self.f.write(bytes('%02x%02x' % (lo, hi), 'utf-8')) + self.f.write(bytes([lo, hi])) self.f.flush() |