I'm writing a program to windows store in c++ which plays back the microphone. I have to modify the bits before sending that to the speakers. Firstly I wanted to play back the microphone without any effect bit it is lagging. The frequency and the bit rate is the same (24 bit, 192000Hz) but I also tried with (24 bit, 96000Hz). I debugged it and it seems that the speaker is faster therefore it has to wait for the data from the microphone like the squeakers would work in a higher frequency but according to the settings it doesn't. Dose anyone have a sightliest idea what is the problem here?
Asked
Active
Viewed 519 times
0
-
Speakers cannot be faster - as long as it works at the same frequency you set it up with, it might have (and has) buffering. The whole audio streaming idea is that playback needs preloaded buffers for smooth operation, while on capture side you receive full buffers with the delay of at least the buffer length. – Roman R. Aug 06 '13 at 15:34
1 Answers
0
When you say that there are some 'lag', do you mean that there are some delay between when you feed the audio capture device with data and when the playback device renders the data or do you mean that the audio stream is 'chopped' with small pauses in between each sample being rendered?
If there's delay in playback I would take a look at with what latency value you've initialized the audio capture client.
If there are small pauses then I would recommend you using double buffering of sample data so that one buffer is being rendered while the other is being re-fetched from the audio capture device.

BennyO
- 123
- 5