From 12902be1b3408657622bc627176574c80d3ac0d8 Mon Sep 17 00:00:00 2001 From: Borewit <borewit@users.noreply.github.com> Date: Tue, 15 Aug 2017 17:41:19 +0200 Subject: [PATCH] quodlibet/mutagen#207: Fix formatting code, add format HTTP-ref --- mutagen/wave.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mutagen/wave.py b/mutagen/wave.py index a38c3399..8c0dbbc8 100644 --- a/mutagen/wave.py +++ b/mutagen/wave.py @@ -232,7 +232,10 @@ def __init__(self, fileobj): data = waveFormatChunk.read() - info = struct.unpack('<hhLLhh', data[:16]) # Ref: https://docs.python.org/2/library/struct.html#byte-order-size-and-alignment + # + # RIFF: http://soundfile.sapp.org/doc/WaveFormat/ + # Python struct.unpack: https://docs.python.org/2/library/struct.html#byte-order-size-and-alignment + info = struct.unpack('<hhLLhh', data[:16]) self.audioFormat, self.channels, self.sample_rate, byte_rate, block_align, self.sample_size = info self.bitrate = self.channels * block_align * self.sample_rate