This might point you in the right direction... unless Nauhty Alien is feeling generous with his code...
http://www.dsprelated.com/showmessage/30036/1.php
There is a thread on FMOD in the forums. You could use this to sample from your sound card.
http://www.dsprelated.com/showmessage/30036/1.php
There is a thread on FMOD in the forums. You could use this to sample from your sound card.