Skip to content

Commit

Permalink
quodlibet#207: Fix formatting code, add format HTTP-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Aug 15, 2017
1 parent a0f6102 commit 12902be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mutagen/wave.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 12902be

Please sign in to comment.