[pulseaudio-discuss] Virtual loopback to provide PCM capture

Tanu Kaskinen tanuk at iki.fi
Mon Jun 29 03:40:53 PDT 2009


2009/6/29 Davide Cescato <ceski at fedoraproject.org>:
> Actually I now have a somewhat related question, for another unrelated task
> I have in mind: recording voip phone calls. What I currently can do is
> recording from the microphone input, which picks up both my voice and the
> other person's voice coming through the speakers. However, the path "out
> through the speakers and in through the microphone" adds a lot of noise to
> the other person's voice.
>
> So, is it possible to somehow set up PA to let me capture a mixed stream
> containing both the internal audio stream carrying the other person's voice
> and the microphone input, so that both voices can be captured in good
> quality? Of course, I would wear headphones to hear the other person's voice
> and to block it from going through the speakers.

No, PA doesn't have a feature to mix multiple recording sources.
However, if the voip app is capable of recording through PA (as
opposed to using the sound card directly) then you could record the
two sources and do the mixing yourself somehow. Recording through PA
shouldn't be any significant feat for alsa applications (just use the
"default" device like with output), but AFAIK skype can't do it
currently.

Recording from multiple sources can have some timing issues due to
clock drift between the sources. If the nominal sample rate is 44100Hz
and the real rate difference is 12Hz between the devices (I think this
might be quite ordinary case) then the drift is about one second per
hour, if I calculated this correctly. For short calls this shouldn't
be too much. Also, if the output device (from which you record using
the monitor source) and the mic device are on the same card, they may
share the clock, in which case no drift happens.

-- 
Tanu Kaskinen



More information about the pulseaudio-discuss mailing list