[wdmaudiodev] SYSVAD sample: virtual microphone: unexpected KSSTATE_STOP/PAUSE

  • From: Martial Bourquin <bourquin.martial@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 15 Aug 2018 14:07:13 +0200

Hi there,

I am working on a virtual audio driver with the goal of providing a virtual
microphone device which receives input data from a given source (network,
file) and replays it, either in real-time or not, depending of the input
data type.

As I am totally new to Windows audio driver development, I started from the
SYSVAD sample with the external headphone mic. For the record, the SYSVAD
sample simply injects a sinusoidal wave into the DMA of the microphone
device.

I managed to make it work with real voice in real time: a userland app
records my voice from a real microphone device and sends it to my modified
version of the SYSVAD sample so that it can be injected into the DMA of the
virtual microphone device.

So far so good, works pretty well with good voice quality.

But I have a very frustrating issue and I am running out of ideas. Here is
the problem: for some unknown reason, my device receives KSSTATE_PAUSE or
PAUSE/STOP state which prevents the injection into the virtual microphone
because I am suspending injection as soon as I receive a state transition
different from RUN.

For example, I check the "listen to this device" of my virtual microphone
device and I expect to hear me when I speak. It works. But when I talk to
Cortana, either Cortana hears me or I hear myself. On a real microphone,
when you check "listen to this device", both Cortana and you can hear what
you have said. In my debug log, I can see my device has received
KSSTATE_PAUSE transition. After talking to Cortana, my device stays in
KSSTATE_PAUSE state until I restart it (disable/enable). Ultimately, the
only way to make it work again is to uninstall and reinstall it.

To sum up the issue I am facing: my virtual microphone device receives for
unknown reason (yet) KSSTATE_PAUSE/STOP state.

Any input would be greatly appreciated,
Thank you in advance for your help.

Martial.

Other related posts:

  • » [wdmaudiodev] SYSVAD sample: virtual microphone: unexpected KSSTATE_STOP/PAUSE - Martial Bourquin