# HG changeset patch # User Thibaut Girka # Date 1340047000 -7200 # Node ID c412df42aa15ca5ce161d45ec5d3868e7a5dcc6b # Parent 2fcdb89669571687bdf79a2c87b04ff87cbc961d Fix music looping diff -r 2fcdb8966957 -r c412df42aa15 pytouhou/ui/music.py --- a/pytouhou/ui/music.py Wed Jun 13 22:53:57 2012 +0200 +++ b/pytouhou/ui/music.py Mon Jun 18 21:16:40 2012 +0200 @@ -31,13 +31,13 @@ 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