<div dir="ltr">Dear list,<div><br></div><div>I ask you for some assistance with null-sink and skipping/stutter.</div><div><br></div><div>On client connect/disconnect and volume changes and many more things, pulseaudio does a buffer rewind to let the changes take effect immediately. So far,s o good, on all my soundcards this works like a charm.</div>
<div><br></div><div>Now I have some audio stream setup where I play audio to a null-sink and record it from null.monitor. This works really great, until some action like pause/play, volume change, or connecting another audio client is causing a rewind. Then the recorded audio hangs for approx 200ms or even more. On soft volume changes, there are many many rewinds done, and so I have many of these skips.</div>
<div><br></div><div>The skipping audio is actually hanging, it does not drop any data. There is just a silent break of about 200ms inserted into the stream.</div><div><br></div><div>Of course it would be great to make rewinding on null sink just work as it does on alsa sinks, but in case this is inevitable, I would be fine with some possibility to disable rewinding. I know that all action then are delayed, but that would be okay for me as the stream is delayed about 8 seconds anyway, until it reaches the receiver.</div>
<div><br></div><div>Here is some log excerpt:</div><div><br></div><div><div>(  81.716|   0.039) D: [pulseaudio] protocol-native.c: Client spotify changes volume of sink input Spotify.</div><div>(  81.716|   0.000) D: [null-sink] module-null-sink.c: Requested to rewind 376320 bytes.</div>
<div>(  81.716|   0.000) D: [null-sink] sink.c: Processing rewind...</div><div>(  81.716|   0.000) D: [null-sink] sink-input.c: Have to rewind 376320 bytes on render memblockq.</div><div>(  81.716|   0.000) D: [null-sink] sink-input.c: Have to rewind 172872 bytes on implementor.</div>
<div>(  81.716|   0.000) D: [null-sink] source.c: Processing rewind...</div><div>(  81.716|   0.000) D: [null-sink] module-null-sink.c: Rewound 376320 bytes.</div><div>(  81.717|   0.000) I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-media-role:music.</div>
<div>(  81.739|   0.022) D: [pulseaudio] protocol-native.c: Client spotify changes volume of sink input Spotify.</div><div>(  81.767|   0.027) D: [null-sink] module-null-sink.c: Requested to rewind 376320 bytes.</div><div>
(  81.767|   0.000) D: [null-sink] sink.c: Processing rewind...</div><div>(  81.767|   0.000) I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-media-role:music.</div><div>(  81.767|   0.000) D: [null-sink] sink-input.c: Have to rewind 364404 bytes on render memblockq.</div>
<div>(  81.767|   0.000) D: [null-sink] sink-input.c: Have to rewind 167400 bytes on implementor.</div><div>(  81.767|   0.000) D: [null-sink] source.c: Processing rewind...</div><div>(  81.767|   0.000) D: [null-sink] module-null-sink.c: Rewound 364404 bytes.</div>
<div>(  81.843|   0.075) D: [pulseaudio] protocol-native.c: Client spotify changes volume of sink input Spotify.</div><div>(  81.843|   0.000) D: [null-sink] module-null-sink.c: Requested to rewind 376320 bytes.</div><div>
(  81.843|   0.000) D: [null-sink] sink.c: Processing rewind...</div><div>(  81.843|   0.000) D: [null-sink] sink-input.c: Have to rewind 367448 bytes on render memblockq.</div><div>(  81.843|   0.000) D: [null-sink] sink-input.c: Have to rewind 168800 bytes on implementor.</div>
<div>(  81.843|   0.000) D: [null-sink] source.c: Processing rewind...</div><div>(  81.843|   0.000) D: [null-sink] module-null-sink.c: Rewound 367448 bytes.</div><div>(  81.844|   0.000) I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-media-role:music.</div>
<div>(  81.990|   0.146) D: [pulseaudio] protocol-native.c: Client spotify changes volume of sink input Spotify.</div><div>(  81.990|   0.000) I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-media-role:music.</div>
<div>(  81.990|   0.000) D: [null-sink] module-null-sink.c: Requested to rewind 376320 bytes.</div><div>(  81.990|   0.000) D: [null-sink] sink.c: Processing rewind...</div><div>(  81.990|   0.000) D: [null-sink] sink-input.c: Have to rewind 350372 bytes on render memblockq.</div>
<div>(  81.990|   0.000) D: [null-sink] sink-input.c: Have to rewind 160956 bytes on implementor.</div><div>(  81.991|   0.000) D: [null-sink] source.c: Processing rewind...</div><div>(  81.991|   0.000) D: [null-sink] module-null-sink.c: Rewound 350372 bytes.</div>
<div>(  82.228|   0.237) D: [pulseaudio] protocol-native.c: Client spotify changes volume of sink input Spotify.</div><div>(  82.228|   0.000) D: [null-sink] module-null-sink.c: Requested to rewind 376320 bytes.</div><div>
(  82.228|   0.000) D: [null-sink] sink.c: Processing rewind...</div><div>(  82.228|   0.000) I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-media-role:music.</div><div>(  82.228|   0.000) D: [null-sink] sink-input.c: Have to rewind 291320 bytes on render memblockq.</div>
<div>(  82.228|   0.000) D: [null-sink] sink-input.c: Have to rewind 133828 bytes on implementor.</div><div>(  82.228|   0.000) D: [null-sink] source.c: Processing rewind...</div><div>(  82.228|   0.000) D: [null-sink] module-null-sink.c: Rewound 291320 bytes.</div>
<div>(  82.262|   0.033) D: [pulseaudio] protocol-native.c: Client spotify changes volume of sink input Spotify.</div><div>(  82.262|   0.000) I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-media-role:music.</div>
<div>(  82.262|   0.000) D: [null-sink] module-null-sink.c: Requested to rewind 376320 bytes.</div><div>(  82.262|   0.000) D: [null-sink] sink.c: Processing rewind...</div><div>(  82.262|   0.000) D: [null-sink] sink-input.c: Have to rewind 376320 bytes on render memblockq.</div>
<div>(  82.262|   0.000) D: [null-sink] sink-input.c: Have to rewind 172872 bytes on implementor.</div><div>(  82.262|   0.000) D: [null-sink] source.c: Processing rewind...</div><div>(  82.262|   0.000) D: [null-sink] module-null-sink.c: Rewound 376320 bytes.</div>
</div><div><br></div><div>Thank you for any help!</div><div><br></div><div>Best regards,<br>Daniel</div></div>