-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Flush Plugin Caches with Silence #2938
Comments
Did you already enable the inactivity time option with a huge number (like 1 hour)? |
|
Run
There isn't an elegant or straightforward way to do that. PipeWire is the one managing each filter state and there isn't a pipeline object with flushing mechanisms like in GStreamer. What we could try is some kind of hack. Creating a node like the one from the test signal that plays silence and linking it to our virtual sink. If that is going to have some unexpected side effect is hard to say without trying it. |
It always does it on its own. What I meant is that it could have done that before we usually remove the links between the filters. The removal of the links is what the timeout controls. |
Like when a node suspends with
I have been using
Yeah, I didn't think this was going to be clean. |
I am not sure. Depending on how complex the processing graph is PipeWire may or may not be able to automatically stop sending buffers to filters in pipelines whose players/recorders are inactive. We unlink the filters exactly as a workaround for the fact PipeWire is not always able to avoid wasting CPU in these situations. It is not clear to me if PipeWire is reading the timeout you are talking about when deciding if it has to stop calling filters callbacks or not.
Compared to what is possible to do in GStreamer it is definitely not good. But it is not the first time that the lack of flushing has caused bad side effects. Eventually we will have to force some kind of flushing. I will try to find some time to investigate how hard it will be to put a hack solution in place. |
For a while now I have been experiencing popping/crackling when starting a new audio stream.
This issue is already well known as seen here #1856 and here #1392
So I understand that the issue is:
After doing my own testing, I can also confirm running this:
aplay -r 48000 -f S24_3LE /dev/zero
as suggested by someone seems to "fix" this issue.Although, it's less than ideal to just have a silent audio stream constantly playing in the background.
So would it be possible to implement some sort of feature to just play silence after a stream ends?
For example, having a setting in preferences that just adds 50 ms of silence or something?
The idea is just to flush the cache of the "old data" to avoid this issue.
The text was updated successfully, but these errors were encountered: