Hi, >You're saying that the audio stops, but that there's no drop-out. Those >two things mean the same thing to me, so it's unclear to me what the >nature of your problem is then. By "drop-out" I mean a situation where >there's a bit of silence inserted to playback, or a bit of audio is >missing from a recording stream. I'm sorry for I don't make it clear enough. I heard the bit of silence from speaker of the bluetooth headset periodically. So there's a bit of silence inserted to playback stream using pacat. Since the pactl thread is occupied in some milli seconds, pacat is not running during that time. So I think pacat put some silence packet inserted to the playback stream in it. Best Regards, Shinnosuke Suzuki 2018-05-03 18:50 GMT+09:00 Tanu Kaskinen <tanuk at iki.fi>: > > On Wed, 2018-05-02 at 08:34 +0900, Shinnosuke Suzuki wrote: > > Hi, > > > > > It's true that when the server processes the "list cards" command from > > > pactl, packets to/from parec/pacat are not processed during time, but > > > sending the card information shouldn't take a long time, so it sounds > > > strange that you'd observe audio drop-outs. Does your application > > > perhaps itself stop processing the audio to/from pacat/parec while it's > > > running pactl? > > > > > > The problem which I have is audio stops only while pactl is running. > > Audio is gradually lagging behind.I mean audio don't drop-out. > > > > Audio stream seems to be delayed every time calling pactl. > > My application calls pactl per three seconds.The process time for pactl > > is not so log time. But process time seems to be accumulated by calling pactl. > > You're saying that the audio stops, but that there's no drop-out. Those > two things mean the same thing to me, so it's unclear to me what the > nature of your problem is then. By "drop-out" I mean a situation where > there's a bit of silence inserted to playback, or a bit of audio is > missing from a recording stream. > > If you are observing changes in end-to-end latency, then that's a > problem in your application. As you're building a telephony app, I > assume the audio pipeline is such that there are two computers both > running your application, and the two application instances stream > audio over the internet. Audio gets from one computer's microphone to > the speakers of the other computer. Have you considered the fact that > the microphone and the speakers run using different clocks? Some clock > drift is unavoidable. Either the speakers consume audio slightly faster > than the microphone produces it, in which case there will be occasional > underruns, or the speakers consume audio slightly slower than the > microphone produces it, in which case the latency will gradually > increase. You'll need to monitor the latency and try to keep it > constant either by resampling or simply by adding/removing samples. > > -- > Tanu > > https://liberapay.com/tanuk > https://www.patreon.com/tanuk -- -- Shinnosuke Suzuki E-mail : suzukisn at gmail.com