Fix bug in OpenAL.
Zerol length audio is not accepted as a valid value by OpenAL on Mac OS X implementation.
We now discard such AudioData instead of writing nothing.
@@ -291,6 +291,10 @@ class OpenALAudioPlayer(AbstractAudioPlayer):
break
length = min(write_size, audio_data.length)
+ if length == 0:
+ assert _debug('Empty AudioData. Discard it.')
+
+ else:
assert _debug('Writing {} bytes'.format(length))
self._queue_audio_data(audio_data, length)
write_size -= length
