I am writing an application to send audio over a socket, problem is, its very very choppy! my buffer size is 1000 bytes, I tried 500, 4096, 8000, all of which exhibit very choppy sound! can someone help? what do I need to do to stream PCM audio without choppy sound? my settings are...
WAVEFORMATEX wfx;
wfx.wFormatTag = WAVE_FORMAT_PCM;
wfx.nChannels = 1; //1: mono, 2, stereo
wfx.nSamplesPerSec = 11025; //11025,22050,44100
wfx.wBitsPerSample = 8; //8,16


this is what Im doing...

---to send audio from the microphone---
waveInPrepareHeader
waveInAddBuffer
waveInStart
//wait for MM_WIM_DATA
//I make a heap copy of WAVEHDR's lpData , and post to another thread
//(done just for testing purpose, will send over socket eventually)
waveInStop
waveInUnprepareHeader
-repeats

--to receive the audio---
thread receives the message
waveOutPause
waveOutUnprepareHeader
waveOutPrepareHeader
waveOutWrite
waveOutRestart
//wait for next message