|
Posted by =?iso-8859-2?B?UmFmYbMgWmnqYmE on August 4, 2008, 5:58 am
Please log in for more thread options
I'm developing managed application that envolves voice recording. I'm faced
with a strange problem. I'm PInvoking native functions and do as fallow
waveInOpen() (callback is a function)
waveInPrepareHeader()
waveInAddBuffer()
As soon as I receive calback with data I'm trying to call
waveInUnprepareHeader() (in seperate thread to avoid deadlock) but I'm
unsuccessful. I did some debugging and found out that Inqueue flag is stiil
set on the header and RecorderBytes field of the header struct is set to 0.
Data buffer is filled with recorded data and I can override the Inqueue flag
and unset it before calling waveInUnprepareHeader(). Everything works fine
then (except RecordedBytes value which is still set to 0). But it's just a
workaround.
--
Rafal
|