[wdmaudiodev] WASAPI:Write to input device's endpoint buffer?

  • From: fanggai318wy <fanggai318wy@xxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 2 Dec 2014 10:36:49 +0800 (CST)


To implement a virtual microphone, there is a virtual audio driver and an 
application,who is responsible for receiving voice data from network and save 

The common way is:
Windows recorder <-> Windows high level audio API(WHLA API) <-> virtual audio 
driver(VAD) <-> virtual microphone

But there is no standard way to hand the audio data received from network to 
VAD, so I want to complete this by using Core Audio APIs in the following way:

Windows recorder <-> WHLA API <-> EndPoint Buffer <-> virtual audio driver(VAD)
The virtual audio driver still provide a standrad interface to system, but the 
difference is directly writting audio data to virtual microphone's endpoint 
buffer, not to VAD.

Diagram about EndPoint 

there is only samples of capture(get) data from input device(microphone), 
and render(set) data to output device(player), I'm not sure 
whether can I write to input device's endpoint buffer? Pseudo code is following:

while (true) {
    CaptureClient->GetBuffer(pBuf); // get microphone's endpoint buffer
    memcpy(pBuf, audioData); // write audio data to gotten buffer


Other related posts: