Virtual audio driver for recording

Def07bba4f272b37980ab8e455532677
0
abljalil 101 Mar 19, 2009 at 10:40

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)
CMiniportWaveCyclicStreamMSVAD::CopyTo
(
    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)
CMiniportWaveCyclicStreamMSVAD::CopyFrom
(
    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

1 Reply

Please log in or register to post a reply.

6673a7d3bfd3d1db5e05c5676cc040b6
0
Goz 101 Mar 19, 2009 at 20:04

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.