|
Re: Audio Steram capturing usinf Filter Driver
Search archieves. The topic of filtering audio stack has been discussed
multiple times in the past.
The summary is that you can't do this reliably.
-- Max.
"Bipin Mistry" <bpnmistry@gmail.com> wrote in message
news:1127382715.271336.47540@g14g2000cwa.googlegro ups.com...
> Hello,
>
> My task is to capture Audio (mic & Speaker) streams using Filter
> Driver.
> To understand Filter Driver architecture I have used Ctrl2Cap sample
> and many other samples available with MSDN and on the net. Am currently
> using source code of Ctrl2Cap sample Filter Deriver as a base for my
> Audio Filter Driver architecture.
>
> My Question:
> 1. What can be replaced with the FILE_DEVICE_KEYBOARD parameter in
> following IoCreateDevice() function to capture Audio Streams(Mic,
> Speaker)
> (Source code from Ctrl2Cap)
> status = IoCreateDevice( DriverObject,
> sizeof(DEVICE_EXTENSION),
> NULL,
> FILE_DEVICE_KEYBOARD,
> 0,
> FALSE,
> &device );
> MSND provided following 3 static defined values which as per me
> interact with sound related activity.
> - FILE_DEVICE_WAVE_SOUND
> - FILE_DEVICE_WAVE_IN
> - FILE_DEVICE_WAVE_OUT
> Am currently making RnD with FILE_DEVICE_WAVE_SOUND &
> FILE_DEVICE_WAVE_OUT.
>
> 2. With the above regards. What can be appropriate replacement for
> (\\Device\\KeyboardClass0) string in following source code that is
> needed to be converted to Unicode string to be passed to
> RtlFreeUnicodeString() function.
> (Source code from Ctrl2Cap)
> sprintf( ntNameBuffer, "\\Device\\KeyboardClass0" );
> RtlInitAnsiString( &ntNameString, ntNameBuffer );
> RtlAnsiStringToUnicodeString(&ntUnicodeString, &ntNameString, TRUE);
> ::
> RtlFreeUnicodeString( &ntUnicodeString );
>
> I am using following:
> for Wave Out :
> sprintf( ntNameBuffer, "\\Device\\AudioOut" );
> for Sound :
> sprintf( ntNameBuffer, "\\Device\\Sound0" );
> sprintf( ntNameBuffer, "\\Device\\Snd0" );
>
> can any one please guide me as I think so I am stuck up with the basic
> driver object creation area. As this is new area to me and specifically
> Audio is new area and am not been able to get much help or the sample
> for sound recording using filter device driver.
>
> Thanks a lot in advance.
> Bipin
>
|