psst icon indicating copy to clipboard operation
psst copied to clipboard

Testers / maintainers of Linux and Windows platform needed

Open jpochyla opened this issue 4 years ago • 25 comments

Although Psst code is mostly multi-platform, I use only Mac OS as my daily driver and develop on Mac, and I don't really have the time that other platforms deserve. So, would you like to own and maintain the platform-specific parts of Psst for Windows or Linux? Volunteers wanted!

jpochyla avatar May 27 '21 17:05 jpochyla

@jpochyla I'd be happy to function as a tester for Linux :D

Liberatys avatar May 27 '21 18:05 Liberatys

I can offer to test under Windows and secondarily under Linux.

shiftgeist avatar May 28 '21 16:05 shiftgeist

I'm interested in learning more about druid and such in my own projects. I'm not sure I can fully own the windows platform, but I wouldn't mind being pinged to help test or debug some issues

Kethku avatar Jul 14 '21 07:07 Kethku

@jpochyla I would be happy to help test on linux. I assume your intent is to verify that new/changed functionality works as intended. Can you periodically post a list of changes, so we know what to look at? Ideally, it would be something people could comment on. Or, just ping me periodically to review PRs,

binyamin avatar Aug 08 '21 22:08 binyamin

I'd also be happy to help with testing on both platforms, linux more readily. Subbed issue, but happy to be pinged directly as well.

cttipton avatar Aug 17 '21 06:08 cttipton

@jpochyla, I'd like to contribute, but I'm somewhat of a rust beginner. Do you have any good first issues? Pref in core not gui related.

emielvanseveren avatar Aug 17 '21 11:08 emielvanseveren

I've been running it all day on Arch ever since the HN post today - I found psst in the AUR. Happy to Linux test.

chayim avatar Aug 17 '21 11:08 chayim

I can help test / triage on windows

miloshadzic avatar Aug 17 '21 15:08 miloshadzic

I am a kind of power user who loves to build stuff. I use Antix, a minimal derivative of Debian and managed to build psst today after some minor hiccups - like had to build pango from source etc and ended up buying a spotify premium subscription to get the login to work (undocumented ?)

Love the program! I am a medium level Rust developer and would be happy to help build/maintain on Debian and its variants.

pythonhacker avatar Aug 17 '21 19:08 pythonhacker

Thank you all! ❤️ I definitely plan to compile a list of changes, we probably should start doing periodic releases.

One Linux question: how important is a direct PulseAudio support? Is it good enough with alsa? We're using miniaudio now, and although it works very well, I'd like to get rid of it for something Rust-based, probably cpal -- but it doesn't support PA and probably never will 🙄

jpochyla avatar Aug 22 '21 11:08 jpochyla

@jpochyla alsa is a low level interface and has a bunch of restrictions, like only ever allowing one application to bind to an audio device, so it's not really suitable for desktop usage.

Pulseaudio is more or less the requirement here and the defacto standard. Where pulseaudio acts as the one application on the device and multitracks all the other applications. There are bridges to allow alsa apps to speak to pulse but this is usually left to the user to figure out, and usually doesn't work very well.

There's also pipewire, the new kid on the block, which you can also speak to natively, but pipewire also provides a shim for pulseaudio applications to work with so it doesn't have to be explicitly supported.

maxaudron avatar Aug 25 '21 20:08 maxaudron

FYI: I had some problems with playback on pipewire as well (most of the time psst just refused to play anything). So I decided to replace miniaudio with cpal and it turned out to be surprisingly easy. See https://github.com/H-M-H/psst/commit/22195cb16222180d408174d4ceccf69855f9a8d1. Playback is working fine for me now.

H-M-H avatar Sep 01 '21 11:09 H-M-H

@H-M-H Thanks for the exploration, glad to hear! miniaudio supports more backends then cpal, we could make this configurable, probably also with a preferred output device option. Do you know what backend miniaudio was using in your setup? For cpal it's alsa, I guess.

Edit: also, cpal is not really enough, we would also need some resampling (at least on Windows).

jpochyla avatar Sep 01 '21 15:09 jpochyla

I have checked the backend and miniaudio was using Backend::PulseAudio. I also tried Backend::Alsa but miniaudio just doesn't seem to want to work with pipewire. And yes cpal uses Alsa.

we could make this configurable

So you would like to keep miniaudio instead of replacing it with cpal for now and cpal should be optional?

also, cpal is not really enough, we would also need some resampling (at least on Windows).

Huh, where does the resampling happen? It doesn't look like it's required?

H-M-H avatar Sep 01 '21 17:09 H-M-H

I also tried Backend::Alsa but miniaudio just doesn't seem to want to work with pipewire.

Uhh that's unfortunate, I was hoping that the alsa backend would work better.

Huh, where does the resampling happen? It doesn't look like it's required?

It seems that Windows don't automatically resample.

jpochyla avatar Sep 01 '21 19:09 jpochyla

It seems that Windows don't automatically resample.

I guess that means I'd need to throw dasp into the mix as well. Are there other obstacles to consider? One thing I am not sure about is whether f32 is everywhere supported as sample format, this may need conversion as well.

H-M-H avatar Sep 01 '21 19:09 H-M-H

Alright, I gave dasp a try. To be honest it was kinda painful to implement as the channel layout as well as sample format need to be known at compile time. However, it appears to be working now, perhaps someone on Windows can try if this works: https://github.com/H-M-H/psst/commit/3f398252663e6bd9c173546d299ce44cde01d724

H-M-H avatar Sep 02 '21 02:09 H-M-H

I did some more research and it seems rodio is the way to go as it provides an interface on a higher level and uses cpal internally. Fortunately it wasn't to hard to implement either: https://github.com/H-M-H/psst/commit/0de081d71b603071ad3ea534bcadf7f7a3a5f417 and it should do resampling etc. internally. I'd love to see someone testing this on other platforms than linux.

H-M-H avatar Sep 02 '21 12:09 H-M-H

@H-M-H Personally I would like to avoid Rodio, and work on lower level, possibly with dasp or rubato. Rodio takes a lot of CPU and the resampling quality is low.

jpochyla avatar Sep 02 '21 13:09 jpochyla

Hmm, I see. To me it looks like rodio is just doing linear interpolation for resampling: https://github.com/RustAudio/rodio/blob/master/src/conversions/sample_rate.rs That's also what I am doing on my cpal branch with dasp. I initially tried Sinc interpolation but that was kinda slow / had my CPU at > 40%.

Also I can't confirm rodio taking a lot of CPU. Both psst with cpal without any resampling as well as with rodio are at about 4% CPU.

Edit: cpal without resampling is as to be expected a slight bit faster/more efficient though.

H-M-H avatar Sep 02 '21 13:09 H-M-H

I also tried Backend::Alsa but miniaudio just doesn't seem to want to work with pipewire.

Uhh that's unfortunate, I was hoping that the alsa backend would work better.

Huh, where does the resampling happen? It doesn't look like it's required?

It seems that Windows don't automatically resample.

I haven't looked into this, but AFAIK using WASAPI on windows would resample, no?

miloshadzic avatar Sep 02 '21 13:09 miloshadzic

@jpochyla @H-M-H I feel like these sorts of technical, problem-solving conversations should have a dedicated issue/discussion. We don't want to cram all linux (and windows) talk into a single issue.

binyamin avatar Sep 02 '21 15:09 binyamin

Agreed, I created a discussion here: https://github.com/jpochyla/psst/discussions/167

H-M-H avatar Sep 02 '21 17:09 H-M-H

totally interested in windows test

Kimorine avatar Mar 28 '22 14:03 Kimorine