forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Milestone
Description
I just tried to make the first game with sound for µGame, and I'm struggling with it a little. I worked around a number of problems, but I'm still left with two issues when playing .wav
files with AudioOut
:
- There are loud clicks at the beginning and at the end of the samples. As I understand, those come from the sound file not starting/ending with a neutral value (middle of the range), and I should be able to solve it by processing the sound files to fix it. However, I wonder if it would be possible for the
AudioOut
code to deal with it internally. - Sometimes a short file will never finish playing, but instead stop at the end with a loud buzzing sound, and stay there forever. Calling
.stop()
on it makes it stop. It happens randomly, and doesn't depend on the file itself.
I'm still investigating what is happening exactly, and I will keep updating this issue.
Here's a video showing the sound problems (the clicks are from the speaker, not from pressing the buttons):