Mercurial > touhou
comparison pytouhou/ui/music.py @ 385:d8aab27a2ab2
Add missing imports, and remove side-effects in asserts.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 20 Oct 2012 20:44:11 +0200 |
parents | e0e284fcb288 |
children | b1248bab2d0f |
comparison
equal
deleted
inserted
replaced
384:690b5faaa0e6 | 385:d8aab27a2ab2 |
---|---|
69 if file is None: | 69 if file is None: |
70 file = open(filename, 'rb') | 70 file = open(filename, 'rb') |
71 | 71 |
72 self._file = file | 72 self._file = file |
73 | 73 |
74 assert b'ZWAV' == self._file.read(4) | 74 magic = self._file.read(4) |
75 assert b'ZWAV' == magic | |
75 | 76 |
76 self.audio_format = AudioFormat( | 77 self.audio_format = AudioFormat( |
77 channels=format.wChannels, | 78 channels=format.wChannels, |
78 sample_size=format.wBitsPerSample, | 79 sample_size=format.wBitsPerSample, |
79 sample_rate=format.dwSamplesPerSec) | 80 sample_rate=format.dwSamplesPerSec) |