Problems with waveinproc and waveinaddbuffer

albertinho86
09-24-2009, 11:44 AM
Hi, I´m programming a sound recorder and I´m having a lot of problems with the callback function waveInProc. I know that I can´t call waveinaddbuffer or any others Apis inside the waveInproc, so I have to use PostMessage.

Could anybody give me some information about the form to use PostMessage/GetMessage in Vb? Because I´m googling a lot and i don´t find any example.

Many thanks, and sorry for my english.

Rockoon
09-24-2009, 12:45 PM
See:

http://allapi.mentalis.org/apilist/PostMessage.shtml

albertinho86
09-26-2009, 04:36 AM
See:

http://allapi.mentalis.org/apilist/PostMessage.shtml

Thanks. I guess what I have to do is:

Private Sub waveInProc (...)

If (uMsg = WIM_DATA) Then

PostMessage(hWnd, uMsg,0,0)

End If
End Sub

And in a thread that i´ve thrown before:

Private Sub AnotherSub (...)
Dim aMsg as MSG
Do
If GetMessage(aMsg, 0, 0, 0)

'Process the wave
EndIf

Loop

EndSub



I don´t know what value I have tu assign to hwnd (¿HWND_BROADCAST,NULL?).

Thanks for the help

albertinho86
09-28-2009, 09:09 AM
Anybody?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum