GLFW, audio and timing

cmakris wrote on Wednesday, April 18, 2012:

Hey everyone, I have some questions regarding GLFW, audio and timing that I
hope you can entertain. They might reveal me to be a very ignorant developer.

So, I am currently using OpenAL for playing audio. I noticed pops/clicks on
stopping or pausing sound, the reasons for which remained a mystery for many
weeks. I have since become (pretty) certain that the reason for these
clicks/pops has nothing to do with OpenAL, and rather it is a physical
electrical issue triggered by the immediate signal change I’m requesting in my
program. I’m running my program with VSYNC enabled, which of course limits my
program updates to 60 fps. If I want to be able to control audio at a higher
frequency, is threading my only answer? Can threading even do this? Is it
possible and/or ridiculous for GLFW to include a callback function that
updates as frequently as possible for such situations?

elmindreda wrote on Thursday, April 19, 2012:

If you are using a non-zero swap interval (i.e. vsync) then the wait happens
inside the GPU driver, not GLFW.

Yes, threading is likely the best solution.

cmakris wrote on Friday, April 20, 2012:

Cool, elmindreda, thanks.