Fixed bug in OpenALSource clear() method.
@@ -285,8 +285,9 @@ class OpenALSource(OpenALObject):
def clear(self):
self._set_int(al.AL_BUFFER, 0)
- for buf_name, buf in self._owned_buffers.popitem():
- self.buffer_pool.unqueue_buffers(buf)
+ while self._owned_buffers:
+ buf_name, buf = self._owned_buffers.popitem()
+ self.buffer_pool.unqueue_buffer(buf)
def get_buffer(self):
return self.buffer_pool.get_buffer()
