Skip to content
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

playback distorted on first track #2574

Closed
ghost opened this issue Mar 31, 2021 · 9 comments
Closed

playback distorted on first track #2574

ghost opened this issue Mar 31, 2021 · 9 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 31, 2021

recently, i switched to pipewire (arch linux) and since then, i always have problems playing back the first audio track under deadbeef 1.8.4 (also affects the current portable version) - the playback is heavily distorted.

to fix it, you have to stop briefly and play the same track again / a new track.

settings: alsa output plugin, default alsa output (pipewire media server)

it does not occur when selecting pulseaudio-output plugin, but since the response time until playback is very slow (roughly a lag of 2 seconds), i prefer the above settings.

unfortunately no log errors, neither in deadbeef nor system-wide. the problem only affects deadbeef, as far as i can tell.

edit:

i just found out, it is a bit more complex.

my db setup consists of several tabs.

doing the play/stop/play trick is working for one tab only. double-clicking on another tab or song of another tab's playlist to start playback and the sound is distorted again. you need to repeat this procedure within every tab once.

@Oleksiy-Yakovenko
Copy link
Member

I doubt that anyone would be fixing this. It sounds like a bug on the pipewire side, in the translation layer alsa<->pipewire<->alsa.
The easiest solution should be to use the deadbeef pipewire plugin:
https://github.com/saivert/ddb_output_pw

@ghost
Copy link
Author

ghost commented Mar 31, 2021

thank you alexey for pointing me to the plugin.

i was not sure wether to post the issue at all, but since only deabeef seems to be affected, it somehow made sense.

with the plugin compiled, i tested the new option.

indeed the issue is gone, but db quits without errors after playing only a few songs. no luck with this one for now.

@Oleksiy-Yakovenko
Copy link
Member

In this case, I suppose you're out of luck for the time being, and I suggest to continue using ALSA or PulseAudio, until PipeWire support becomes better :)

@Oleksiy-Yakovenko
Copy link
Member

Btw, you should also try the latest deadbeef release -- I don't remember for sure, but I think there were some fixes related to pipewire support.

@Oleksiy-Yakovenko
Copy link
Member

Oh, nvm, I see you mentioned the current portable build, which is probably the latest version.

@saivert
Copy link
Contributor

saivert commented Mar 31, 2021

The pipewire ALSA PCM IO plugin (translates from ALSA to pipewire) doesn't handle format changes mid-stream. You need to full reinit it. This will be fixed in pipewire eventually, it is a known issue.

Though if you are interested I'm workin on a Pipewire output plugin here: https://github.com/saivert/ddb_output_pw/

@ghost
Copy link
Author

ghost commented Apr 1, 2021

@alexey: it just interested me. pipewire is just not quite ready, but this was clear to me and is not a big deal. foobar works very well with it, for example.

@saivert: thanks for the link. i have already tested this plugin thanks to alexey (see above) :)

@beliys
Copy link

beliys commented Apr 9, 2021

Stumbled upon this discussion by accident. Personally, I ran into this problem back in January and the problem with the output to ALSA was and is observed only DeaDBeeF.
As far as I know at the moment, there are 2 ways to solve this problem:

  1. Pipewire output plugin -https://github.com/saivert/ddb_output_pw/ ( thanks @saivert )
  2. Use the "Override samplerate" option, and the problem will be fixed even if the value does not match the samplerate of the source (resampling fixes the problem, although it is not welcomed by audiophiles).

Personally, I think that the problem can be fixed at the ALSA output plugin level, since there is no such problem for similar plugins in similar products.

@Alexey-Yakovenko , is it possible to make the Pipewire output plugin official and provide along with others from here https://github.com/DeaDBeeF-Player/deadbeef/tree/master/plugins? This would make it much easier for newbies to solve such problems, especially considering that many Linux distributions are starting to use Pipewire by default.

@Oleksiy-Yakovenko
Copy link
Member

I can't answer this. There are no current plans to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants