Click to See Complete Forum and Search --> : problem using Wave API (help plz)


mohahhh
January 25th, 2006, 12:53 PM
hi
i managed to make the program work after large number of errors.
but i dont understand something when i record using function
(waveInOpen,waveInPrepareHeader,waveInAddBuffer,waveInStart,waveInStop,waveInReset)

these are the steps i do

1- prepare buffer to record
using this function (waveInPrepareHeader).
2-send the buffer to the sound card to start sending
using this function (waveInAddBuffer).
3- then use this function (waveInStart) to record

but the problem is that after finish recording i dont see any wave file saved and i dont know how to continue,
the attach file is the code
plz if any one could help,
thanks in advance

wildfrog
January 25th, 2006, 02:30 PM
but the problem is that after finish recording i dont see any wave file saved and i dont know how to continue,After a quick glance at your code I cannot see that you're trying to create a file at all.
The next step, after your 'buffer' have been filled with data and returned to your application, is to save that buffer to a file.

Maybe this Wave Player & Recorder Library (http://www.codeguru.com/Cpp/G-M/multimedia/audio/article.php/c9305) can help you out.

- petter

mohahhh
January 26th, 2006, 05:40 AM
thanks alot for replaying so fast
but sorry for asking again i discovered that it doesnt record it give an error if u see m_result (which is the output error if displayed)
it says

WAVERR_STILLPLAYING:The buffer pointed to by the pwh parameter is still in the queue

i dont know what does this error mean
thanks for your help
bye
maha