Mercurial > touhou
diff pytouhou/ui/music.py @ 324:c412df42aa15
Fix music looping
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Mon, 18 Jun 2012 21:16:40 +0200 |
parents | 61adb5453e46 |
children | cddfd3cb4797 |
line wrap: on
line diff
--- a/pytouhou/ui/music.py +++ b/pytouhou/ui/music.py @@ -31,13 +31,13 @@ class InfiniteWaveSource(WaveSource): def _get_audio_data(self, bytes): - if bytes % self.audio_format.bytes_per_sample != 0: - bytes -= bytes % self.audio_format.bytes_per_sample + bytes -= bytes % self.audio_format.bytes_per_sample + data = b'' length = bytes while True: size = min(length, self._end - self._offset) - data = self._file.read(size) + data += self._file.read(size) if size == length: break