|
-
May 15th, 2008, 09:28 AM
#3
Re: waveInStart audio is very choppy
Thanks for you response! I did end up figuring it out last night!
The problem was, I did not have enough buffers flowing to the sound devices.
I increased my buffers to 10 x 1000, and this is the method am using now, and its really smooth!....
---to send audio from the microphone---
{create WAVEHDR on heap, waveInPrepareHeader, waveInAddBuffer}
//loop previous line 10 times to make a nice buffer for mic
waveInStart
//on MM_WIM_DATA we used a buffer, so add another one, then cleanup
//the one we just rcv'ed (after sending it of course)...
{create WAVEHDR on heap, waveInPrepareHeader, waveInAddBuffer}
{waveInUnprepareHeader passed by MM_WIM_DATA, send lpData,
delete WAVEHDR, and then lpData}
---to play audio---
rcv lpData, waveOutPrepareHeader, waveOutWrite
on MM_WOM_DONE message, I cleanup the WAVEHDR
this method works perfect, and is not choppy at all!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|