Hello everyone

If some can solve it please I can spend my weekend in peace...

I am recording microphone data on a pocket pc and saving it to a wave
file...

I am following the general basic steps as follows

start recording
===========
waveinOpen->waveInPrepareHeader->waveInAddBuffer->waveInStart

by default i am recording 7 seconds of speech...

all works fine if i wait for 7 seconds and wait for the WIM_DATA to get
fired automatically wherein i write my buffer to a wave file...where i
also use waveInUnprepare and waveInClose after writing is finish

problem starts when I stop recording midway by clicking the stop button
where i call waveinStop()->waveInReset() (which should eventually fire
the WIM_DATA and send the buffer as DONE)

my system
1) either goes in an infinite hang OR
2) if somehow it does not hang no buffer data is passed..its all
empty....

what modification I need to do...

any help is highly appreciated...

Sid

Re: problem in recording wave file by grubbymaster

grubbymaster
Thu May 04 08:20:11 CDT 2006

hi

I'm working on the same thing myself ... and everything goes well
except the part when i want to test the saved file (it cannot be opened
with any program that can play wave files , so i don't know if
everything worked ok , although i receive the messages in myh Callback
function corectly).

Read this http://www.borg.com/~jglatt/tech/lowaud.htm and you can
download an example from there also.
If you manage to make it work , please send a copy of the *.cpp file to
me : grubbymaster@gmail.com

Regards,
Grubby


Re: problem in recording wave file by sid

sid
Fri Jun 02 10:19:18 CDT 2006

make sure you are making the RIFF header in the right way...

as its been long..if in this time you ahve done eveything..very well
else i can give u the code..

my problem is when i stop the recording in between...

if i leave do not press the stop button in my screen and let all
buffers get exhausted on its own .. then all goes well, but if i stop
in between it writes junk buffer to the file..i am puzzled where the
buffer gets lost/corrupted...anyone any say...

sid


Re: problem in recording wave file by grubbymaster

grubbymaster
Fri Jun 02 13:21:17 CDT 2006

hi sid

i've been working on OGG compression using the tremor libraries for
Pocket PC and i haven't had the time to look over the record
part.You're post came in perfect time , as i have to implement the
record part also.Can you send me pls your zip-ed project or the source
code to grubbymaster@gmail.com.

thanks,
Grubby