WASAPI: Play sine wave sound in minimum latency without glitches (exclusive-event driven mode)
问题 I'm trying to play a simple sineous waveform using the Windows Audio Session API (WASAPI) in exclusive mode, but encountering sound glitches no matter what I do. I've been using the MSDN Exclusive-Mode Streams example as a reference point, and here's how the slightly adapted code currently looks like. Setup code: -- <variable declarations, incl. "HRESULT hr; BYTE *pData;" > -- // also, hr is checked for errors every step of the way hr = CoCreateInstance( CLSID_MMDeviceEnumerator, NULL, CLSCTX