3 ms·
You could also drive this using an audio queue which uses hardware to generate the timer events.
by adamnemecek 4y ago
You could also drive this using an audio queue which uses hardware to generate the timer events.
- kevingadd 4y agoUnfortunately history has shown that you can't necessarily lean on the audio hardware to give you a stable, reliable clock. Part of the reason Windows moved to doing all its audio mixing in software (a long time ago at this point) was that hardware audio devices and/or drivers tended to be really bad at providing reliable clocks. See this random example from google results: https://duc.avid.com/showthread.php?t=334589 https://duc.avid.com/showthread.php?t=334589 Winamp had a ton of special purpose code in it just to compensate for bad clocking and timing in consumer sound cards so that you could play back audio at proper rates without gaps or glitches. Mobile seems to be no better - I remember getting fed up playing rhythm games on a Motorola phone I owned because, I kid you not, the hardware audio clock would occasionally run backwards.