|
|
|
date: Fri, 4 Jul 2008 03:21:11 -0700 (PDT),
group: microsoft.public.windowsmedia.sdk
back
Re: waveout/direct sound call to get audio output stream
On Jul 8, 10:53 pm, "Alessandro Angeli"
wrote:
> From: "rajani_sp"
>
> > So how can I know which Waveout/ directsound calls do i
> > need to use for detour. ?
>
> You start by hooking the opening/creation calls and then
> other calls until you find the data you need.
>
> --
> // Alessandro Angeli
> // MVP :: DirectShow / MediaFoundation
> // mvpnews at riseoftheants dot com
> //http://www.riseoftheants.com/mmx/faq.htm
Hi ,
sorry for replying after a long time. Now I am able to
hook WaveOut calls. But lpdata of WAVEHDR
when i try to save it into a file and play file using
"audacity" it is different from the original wav file i
used.This the code used in Detour WaveOutwrite
function.
//Modify waveOutWrite
__declspec(dllexport) MMRESULT WINAPI DetourwaveOutWrite(HWAVEOUT
hwo,LPWAVEHDR pwh,UINT cbwh)
{
// Get o/p stream here.
printf(" DetourwaveOutWrite\n");
LPSTR str = pwh->lpData ;
HANDLE hFile ;
DWORD dwBytes;
int numwrite;
printf("sampling started...");
FILE* stream=fopen("kelvin.tin","ab");
numwrite = fwrite( pwh->lpData,sizeof(pwh->lpData),pwh-
>dwBufferLength,stream);
fclose(stream);
return Real_waveOutWrite(hwo,pwh,cbwh);
}
Thanks
Rajani
date: Tue, 22 Jul 2008 02:29:07 -0700 (PDT)
author: rajani_sp
Re: waveout/direct sound call to get audio output stream
"rajani_sp" wrote:
> On Jul 8, 10:53 pm, "Alessandro Angeli"
> wrote:
> > From: "rajani_sp"
> >
> > > So how can I know which Waveout/ directsound calls do i
> > > need to use for detour. ?
> >
> > You start by hooking the opening/creation calls and then
> > other calls until you find the data you need.
> >
> > --
> > // Alessandro Angeli
> > // MVP :: DirectShow / MediaFoundation
> > // mvpnews at riseoftheants dot com
> > //http://www.riseoftheants.com/mmx/faq.htm
>
> Hi ,
> sorry for replying after a long time. Now I am able to
> hook WaveOut calls. But lpdata of WAVEHDR
> when i try to save it into a file and play file using
> "audacity" it is different from the original wav file i
> used.This the code used in Detour WaveOutwrite
> function.
>
> //Modify waveOutWrite
> __declspec(dllexport) MMRESULT WINAPI DetourwaveOutWrite(HWAVEOUT
> hwo,LPWAVEHDR pwh,UINT cbwh)
> {
> // Get o/p stream here.
> printf(" DetourwaveOutWrite\n");
> LPSTR str = pwh->lpData ;
> HANDLE hFile ;
> DWORD dwBytes;
> int numwrite;
> printf("sampling started...");
> FILE* stream=fopen("kelvin.tin","ab");
> numwrite = fwrite( pwh->lpData,sizeof(pwh->lpData),pwh-
> >dwBufferLength,stream);
> fclose(stream);
> return Real_waveOutWrite(hwo,pwh,cbwh);
> }
>
> Thanks
> Rajani
>
Did you ever get this resolved?
I am trying the same, but I need to hook dsound. On investigation hooking
directx as apposed to winmm has some challenges since dsound.dll as a COM
has only really a few entry points ,all the "create" functions , but
thereafter related functions are actually pointers to the functions accessed
via the interface.
Have you ever hooked a com interface before? Not sure if it is possible!
Derek.
date: Sun, 3 Aug 2008 12:55:00 -0700
author: Derekm
|
|