Hello!
I'm the author of Virtual Audio Cable (VAC) software; it is a virtual audio device driver. One of VAC users reported that NAudio WASAPI exclusive-mode capture produces permanently garbled audio data.
I have reproduced it in Win7 SP1 (both x86 and x64) with NAudioWpfDemo. In shared mode, the driver gets capture buffers (IOCTL_KS_READ_STREAM) in time and the stream is stable. But in exclusive mode, there are large (50-100 ms) gaps between capture buffer groups (the application sends IOCTL_KS_READ_STREAM in groups of 3). In other words, the driver gets three capture requests, starting to fill the buffers, completes the first request, then the second and the third, but the application does not provide next capture buffers/requests in time.
This problem does not occur with native Windows device drivers and VB-Audio virtual driver so I thought there is a bug in VAC but under Win8 and Win8.1, NAudioWpfDemo works fine with VAC too.
In NAudio sources, I see that it is Win8-aware; what may be different in audio capture process between Win7 and Win8?
Maybe the difference is due that VAC is a WavePci miniport driver while VB-Audio is WaveCyclic one. Both WaveCyclic and WavePci drivers accept IOCTL_KS_READ_STREAM requests but WaveCyclic driver fills them immediately from its internal buffer while WavePci driver queues them and fills as soon as audio data become available (no pre-buffering is used).
Regards,
Eugene
I'm the author of Virtual Audio Cable (VAC) software; it is a virtual audio device driver. One of VAC users reported that NAudio WASAPI exclusive-mode capture produces permanently garbled audio data.
I have reproduced it in Win7 SP1 (both x86 and x64) with NAudioWpfDemo. In shared mode, the driver gets capture buffers (IOCTL_KS_READ_STREAM) in time and the stream is stable. But in exclusive mode, there are large (50-100 ms) gaps between capture buffer groups (the application sends IOCTL_KS_READ_STREAM in groups of 3). In other words, the driver gets three capture requests, starting to fill the buffers, completes the first request, then the second and the third, but the application does not provide next capture buffers/requests in time.
This problem does not occur with native Windows device drivers and VB-Audio virtual driver so I thought there is a bug in VAC but under Win8 and Win8.1, NAudioWpfDemo works fine with VAC too.
In NAudio sources, I see that it is Win8-aware; what may be different in audio capture process between Win7 and Win8?
Maybe the difference is due that VAC is a WavePci miniport driver while VB-Audio is WaveCyclic one. Both WaveCyclic and WavePci drivers accept IOCTL_KS_READ_STREAM requests but WaveCyclic driver fills them immediately from its internal buffer while WavePci driver queues them and fills as soon as audio data become available (no pre-buffering is used).
Regards,
Eugene