psst
psst copied to clipboard
Testers / maintainers of Linux and Windows platform needed
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 I'd be happy to function as a tester for Linux :D
I can offer to test under Windows and secondarily under Linux.
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
@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,
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.
@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.
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.
I can help test / triage on windows
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.
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 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.
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 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).
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?
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.
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.
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
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 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.
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.
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?
@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.
Agreed, I created a discussion here: https://github.com/jpochyla/psst/discussions/167
totally interested in windows test