Re: PulseAudio null sink monitor gives distorted audio randomly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[resending to the list, really this time]

On 11/8/18 7:44 PM, Tanu Kaskinen wrote:

The problem is most likely due to this bug regarding monitor sources:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/304

Whenever the monitored sink has a rewind, a chunk of audio is
apparently duplicated in the monitor source. It would be great if
someone could figure out what goes wrong in the monitor rewinding code.

Let me quote the main mistake, from src/pulse/stream.h:

 * The latency is stored in \a *r_usec. In case the stream is a
 * monitoring stream the result can be negative, i.e. the captured
 * samples are not yet played. In this case \a *negative is set to 1.

I.e., the design mistake is that monitor sources allow one to capture samples that have not yet been played. This is always wrong, as those samples can be overwritten by a rewind, and there is no "uncapture" to compensate. So the fix would be to make sure that monitor sources capture not what was just written to them, but what was actually played and can no longer be overwritten. I.e., change the latency from negative to small positive.

--
Alexander e. Patrakov

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux