# Virtual audio driver for recording

### #1abljalil

New Member

• Members
• 1 posts

Posted 19 March 2009 - 10:40 AM

i am also developing the Virtual audio driver.
my main goal is to capture sound from one PC and transfer to an other PC in order to do that i am modifiy msvad->Simple code for capting the sound. this is because i want to create a virtual sound card driver inorder to capture the sound played on a remote PC which has no Phasical sound card.

the simple logic is sound--->MSVAD--->mysoftware--->network stream.

when i capture sound form MSVAD. i get clicking sound the orignal sound.
and there is also click sound recorded form "windows sound recorder"

i think that this driver is only for render the sound. i have seen CopyTo and CopyFrom which is empty these are as follow.

//=============================================================================
STDMETHODIMP_(void)
(
IN  PVOID                   Destination,
IN  PVOID                   Source,
IN  ULONG                   ByteCount
/*++

Routine Description:

The CopyTo function copies sample data to the DMA buffer.
Callers of CopyTo can run at any IRQL.

Arguments:

Destination - Points to the destination buffer.

Source - Points to the source buffer

ByteCount - Number of bytes to be copied

Return Value:

void

--*/
)
{
m_SaveData.WriteData((PBYTE) Source, ByteCount);
} // CopyTo


and copyFrom is
//=============================================================================
STDMETHODIMP_(void)
(
IN  PVOID                   Destination,
IN  PVOID                   Source,
IN  ULONG                   ByteCount
)
/*++

Routine Description:

The CopyFrom function copies sample data from the DMA buffer.
Callers of CopyFrom can run at any IRQL

Arguments:

Destination - Points to the destination buffer.

Source - Points to the source buffer.

ByteCount - Points to the source buffer.

Return Value:

void

--*/
{
} // CopyFrom


### #2Goz

Senior Member

• Members
• 575 posts

Posted 19 March 2009 - 08:04 PM

If you are getting a clicking sound then most likely the buffer is not refilled fast enough. Are you double buffering your capture and playback? ie queuing 2 buffers to receive audio buffer. When the first finishes you fill it with the next block of audio data while the second block plays. When the second finishes you fill it with the next block while the first plays asnd so forth.

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users