Playing a wav file while a thread is running
I'm using visual studio 2008 and started a win32 console.
I've created a thread that does a voice recognition.
I want to play a wav file after a certain word is spoken, that problem is that when I use
"sndPlaySound("temp.wav",SND_SYNC)" after I identified the word, it plays the wave but the thread is still working and continues to work and wait for another voice input.
how can I make the thread to be on hold until the playing of the wave file is over?
I added some more info about my thread and the voice input maybe it will help.
DWORD WINAPI NSCThread(LPVOID arg);
I also use for the voice recording input a WAVEFORMATEX type.