<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hi Chase,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">let me know the results of your tests.
I would especially be interested in the<br>
difference between using module-null-sink with module-remap-source</div>
<div class="moz-cite-prefix">and module-null-source with the uplink
sink of module-remap-source.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Regards</div>
<div class="moz-cite-prefix"> Georg<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 19.04.22 01:32, Chase Lambert wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABkUTfmAeG09yn_Q4VbGO8YMpM92dRZaEAa6wk82Dbmfisrxow@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Thanks for the replies!
<div><br>
</div>
<div>guest271314 - Huh, that's odd that you would see any audio
differences. My stab in the dark guess would be some sort of
PulseAudio resampling? Otherwise I would think the PCM data
would be the same. I'll double check that the audio quality is
as expected.<br>
<br>
Georg - I can see how that MR could reduce latency,
interesting.<br>
<br>
I'm kind of just thinking out loud here, but the latency can
get very low (say to 10ms), right? As long as I have small
numbers in pa_buffer_attr, I would think that:</div>
<div>- My application would get a callback from PulseAudio,
telling it to write something<br>
- My application writes something<br>
- Immediately thereafter, Chrome gets a callback to read data</div>
<div>- Chrome reads the data<br>
- There isn't a risk of an underrun here by Chrome, because it
will only get callbacks when data is ready (hazy guess!)</div>
<div><br>
I ask this because my alternative is modifying Chromium and
sending data directly to it over a custom IPC channel. But in
theory that IPC channel should not be faster than PulseAudio.
PulseAudio is just acting as a queue, and ultimately just a
form of IPC between my application and Chrome.</div>
<div><br>
</div>
<div>In any case, I'll soon find the answer myself. Thanks!</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Apr 17, 2022 at 9:13
AM guest271314 <<a href="mailto:guest271314@gmail.com"
moz-do-not-send="true">guest271314@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I am not sure about different latencies re
module-remap-source and module-virtual-source. From my
testing the quality of audio output when using a remapped
source with getUserMedia() is inferior compared to getting
the raw PCM using pactl or parec with fetch() on the browser
side then using AudioWorklet or MediaStreamTrackGenerator in
Chrome/Chromium to output the audio.
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Apr 16, 2022 at
9:49 PM Chase Lambert <<a
href="mailto:chaselambda@gmail.com" target="_blank"
moz-do-not-send="true">chaselambda@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I'm trying to make a low latency Virtual
microphone. What that means is I make a null sink, and
then a module-virtual-source or module-remap-source
that has a master pointing to the sink's monitor.</div>
<div><br>
</div>
<div>Then I can write to that sink, and get data to show
up in this virtual microphone.</div>
<div><br>
</div>
<div>I've found that module-remap-source has a lower
latency than module-virtual-source, (~400ms lower it
seems), but I don't have any idea why. And more
generally -- what is the difference between these two
modules? I looked at their source and also the git
history, but that didn't clear much up for me.</div>
<div><br>
</div>
<div>Also, is this the best way to make a low latency
microphone? I have an application that I want to send
data to Chrome, with as low latency as possible.
Chrome operates directly with pulseaudio[0].</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Chase</div>
<div><br>
</div>
<div>[0] <a
href="https://source.chromium.org/chromium/chromium/src/+/main:media/audio/pulse/audio_manager_pulse.cc"
target="_blank" moz-do-not-send="true">https://source.chromium.org/chromium/chromium/src/+/main:media/audio/pulse/audio_manager_pulse.cc</a></div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>