Hello,
I am writing an application that plays with a buffer that I obtained
from the sound card using the wave APIs. I was looping, or polling, to
check when the data was delivered, but I wish to use the callback that
is listed in the MSDN. I can't seem to figure out how to implement
this into VB.NET. I also can't figure out how to grab the address of
the subroutine that will be called and hold it so that the garbage
collecter doesn't move it. Any help would be appreciated. I've found
lots of examples in C and even one in VB, but I can't seem to move them
over. If possible, could give me some example code to help me on my
way? Here are a few things I found on the web that may be of interest
to you:
The MSDN page on waveInProc:
http://msdn.microsoft.com/library/en...waveinproc.asp
http://www.pcreview.co.uk/forums/thread-1433610.php
Code example:
http://www.codeproject.com/useritems/julienT.asp
http://www.eggheadcafe.com/ng/micros...post581858.asp
http://www.lancs.ac.uk/ug/brownjl/pa...trol/audio.cpp
http://www.jcomeau.com/src/wavein/rec.c
Thanks,
Brett
P.S. Also, the MSDN states that I can't have any system calls inside
my callback or I'll deadlock. Can I RaiseEvent somewhere in my
program? Is this acceptable? On top of that, I see people using the
waveAPI inside their callbacks?!?!?!? Did I miss some sort of upgrade
to the MSDN?