Open deshipu opened 5 years ago
Here is a recording: https://youtu.be/_ghOrXVjnwM
Thanks for testing this! We may need longer audio buffers but partial display updating should help as well.
I can confirm the same problem. Buffer length may not address the issue. Consider where a display update starts just prior to playing audio. For example, on a Hallowing:
print('playing sound file')
wave_file = open(filename, 'rb')
wave = audioio.WaveFile(wave_file)
audio.play(wave)
The print() statement will start a display update, and once the audio.play() routine starts it is already too late. It seems like audio is stuck with bad buffer values before it even starts. I would suggest the following:
Frankly, I'd be thrilled with 1 and 2
I have similar issues but I've been shrinking sizes and reducing stepping of x
/y
to make it less apparent.
I tried to make a game that would have both music and graphics. I decided to make a simple Tetris game for the Hallowing. The code is here: https://github.com/deshipu/hallowing-tetris
Unfortunately, when the display is being refreshed, that interferes with audioio playback and the result is distorted sound.