Handmade Hero»Forums»Code
2 posts
Day 009 - Sound frequency is changing every few seconds even though wave period is constant, and no input is given.
Edited by Euphoria on Reason: Initial post
Hello there!

I've been following the series, and got a weird bug.
Just as the title describes it seems like frequency changes every few seconds, recording of the bug: https://youtu.be/Q5HqSLJEwQs (see description for time stamps).

This even happened with the official pre-order code as shown in the recording.

I didn't use any controller/keyboard/mouse input to change it, the wave period field is constant, and it's value is shown to be 187 in the video.

Am I doing something wrong?
Is it a code bug?
Is it a problem with my hardware?

Help would be appreciated.

Thanks,
David
Mārtiņš Možeiko
2562 posts / 2 projects
Day 009 - Sound frequency is changing every few seconds even though wave period is constant, and no input is given.
I believe this is same issue as discussed here: https://hero.handmade.network/for..._lose_precision_after_a_while#604

Casey fixes this in Day 20: https://hero.handmade.network/episode/code/day020/#9159
2 posts
Day 009 - Sound frequency is changing every few seconds even though wave period is constant, and no input is given.
Great, thanks for the swift reply!