Closed Ambusy closed 5 years ago
The problem is now solved in all recorders I have tested. The line
int sleepDuration = actualLatency;
in function CaptureProc of WasapiCapture.cs should be modified. In the 2014 version it was actualLatency/8; I tried to lower that number down, and found that in my environment (win7pro, Vs 2019 community) if it reads:
int sleepDuration = actualLatency/2;
everything works fine.
I have a Windows 10 Home pc with Visual Studio Community 2017. I downloaded a fresh CSCore, changed the build command to reflect the SDK on my pc, removed SoundTouchPitchAndTempo because it cannot be compiled, build the project and then executed
As all programs that use WASAPI loopback capture present the same faults, I've been trying to discover changes for Win10 in the Microsoft documentation. I found (https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/low-latency-audio#overview) this: Starting with Windows 10, the buffer size is defined by the audio driver (more details on this below). Could this be the reason that the buffers are clearly not written with adjacent data? I examined the original wave with the recorded one and found a first glitch at 00:00:00:0050 then 250ms later at 0300, 250ms later at 0550, 450ms to 1000, 450ms to 1450, 250ms to 1700, 450ms to 2150, 250ms to 2400, 250ms to 2650, 450ms to 3100, 250ms to 3350, 450ms to 3800, 250ms to 4050, 450ms to 4500, 250ms to 4750, 450ms to 5200, 250ms to 5450, 450ms to 5900, 250ms to 6150. The fault occurs after 450 or 250ms but I don]t see regularity yet. See attached images: first one shows the source with the missing part selected, second one the recording with a glitch at 00:00:00:0325 where a vertical line bridges the glitch, third one shows the missing part, 11ms.
WHO can help me, as I'll have to migrate my programs to the new OS.
Tried it today 25 august 2019 on a windows 7 pro in visual studio 2019 community: same problem