Hello, I'm looking at linphone-3.6.1, in the file mediastreamer2/src/audiofilters/alsa.c.
In the alsa_read_process() routine, non-threaded version, line 919, it says:
This filter is being run by a ticker running at 100 ticks per second, with a sampling rate of 16000 samples per second. So I would have thought there should be 160 samples per tick. Instead this formula gives (128*16000)/8000 = 256 samples. Why the disparity here?
I put in some tracing code and it seems that on quite a few ticks there are no samples returned, which is to be expected if more samples are requested on each tick than are available from the driver. The audio being captured also sounds somewhat scratchy and staticky, and I'm wondering if this is the reason because it sounds fine when I record using parecord.
In the threaded version of alsa_read_process() it says
which also seems inconsistent.
Any help/explanation would be much appreciated.