Streaming input from sound card input

Hi!
I'm using the structure WAVEHDR and the functions waveInStart, waveInClose etc. to capture the audio from the sound card. I use several buffers, and I have a problem with them. I use the variable dwFlags to know when a buffer is complete, but in this way: "while ((wavehdr1.dwFlags & WHDR_DONE) != TRUE);" it doesn't work in the release version of Visual Studio. I think that happens because, when compiling, the system optimization doesn't let the statement to be refreshed, and always sees the first value.

Anybody knows how I can solve this? How can I use the dwFlags properly?

Thank you,

xagutxu
Topic archived. No new replies allowed.