Handmade Hero»Forums»Code
Sean Jones
2 posts
Slow wake from Sleep() and audio glitches
I'm currently following a long with the series but I am behind (episode 20). When running handmade hero I have noticed (on my laptop) that it will takes between 33.33-34.31ms to execute each frame and there are one or twice audio artifacts every few seconds when using Sleep(). I thought I had done something wrong, so after a long time scrutinizing my code (also diffing with the official code) it turned out to be the same.

I compiled and ran the source from the official zip and I still get the same variation in ms/f and audio glitches.

My laptop has an Intel Ivy Bridge Core i5 3337U 1.87GHz, so I'm assuming it has plenty of processing power (I play a good few games just fine).

Any suggestions on how to fix this issue? Is there possibly a setting in Windows to make it a bit more responsive? I have had to change the power settings to get it to use the AMD chip as it has switchable graphics. I would not be surprised to find out there are more power saving settings possibly causing this issue.
Patrick Lahey
67 posts
Slow wake from Sleep() and audio glitches
This is a known issue. You can see what has been discussed so far here: Sleep problem causing Audio pops
Sean Jones
2 posts
Slow wake from Sleep() and audio glitches
Thanks! I had a look through the forums and couldn't see this.