i am using virtual audio device/driver get from DDK.
In DDK have available virtual audio driver, i have build msvad folder then
install with msvad.inf file. Chose AC3 in during installation.
I would like to pass sound data (were captured in to a sound buffer) to
virtual audio device. And sure my Audio In device is a real device.
But it seem , i can not use this virtual driver for now. I must change code
in source files of MSVAD and rebuild and then reinstall, right?
Can help/show me how to pass the sound buffer to virtual audio driver, and
then get this buffer from virtual audio driver to real audio device for
This is need for me, hope will have anyone can help me..
Thanks for any help.
How to pass data from virtual audio device to real hardware :
1: catch data from copto fuction of msvad sample
2: In the same function create your own Irps and fill the data
which u got in copyto function.
3: Get symbolic link name of real hardware function driver.
4: send filled irps to the function driver
Thank you for the steps, but I was wondering how exactly this is done.
I am new to driver development and IRP's.
I have troubles putting step 2 into code. What API would you use to create the IRP? It seems at least I need to know the stacksize to use IoAllocateIrp, how do I retrieve that from the MSVAD sample driver? And how would I fill it with the source data?
sorry for the late reply. I left the driver field and now in to Network Stacks. Still if you want the code related to that i will provide.
hi,i am writing a driver which can capture all sounds from a computer,and now i am learning the msvad source code,but still many things can`t understand,can you give me some source code about this ?? thank you, my email is : email@example.com
Do you have code implementation for copyto/copyfrom function ?
I read basedma.cpp in the msvad but i donot know what need to implementation for copyto function.
Can you send to me your sample code , email firstname.lastname@example.org
Thank for your help.
hello singamkiranreddy and others,
I am trying to achieve the same thing here, and having trouble on how to implement the copyto/copyfrom function.
could you please send me the sample code? my email is email@example.com
Thank you very much,
IN PVOID Destination,
IN PVOID Source,
IN ULONG ByteCount
The CopyTo function copies sample data to the DMA buffer.
Callers of CopyTo can run at any IRQL.
Destination - Points to the destination buffer.
Source - Points to the source buffer
ByteCount - Number of bytes to be copied
if(Count==6) //after 6 writes create Irp and pass it down
irp1 = IoAllocateIrp (FunObject->StackSize, FALSE);
irp1->IoStatus.Status = STATUS_NOT_SUPPORTED;
irp1->IoStatus.Information = 0;
PIO_STACK_LOCATION irpStack = IoGetNextIrpStackLocation(irp1);
irpStack->MajorFunction = IRP_MJ_DEVICE_CONTROL;
DbgPrint("sending buffer is =%x sending BufferLength is =%x",irpBuffer,irpBufferLength);
IoSetCompletionRoutine(irp1, DataIrpComplete, this, TRUE, TRUE, TRUE);
//pass IRP to FunctionDriver
NTSTATUS Status = IoCallDriver(FunObject, irp1);
// m_SaveData.WriteData((PBYTE) Source, ByteCount);
} // CopyTo
Please use ...[/code] to post code. [code]...[/code****] to post code.