smasher164 / pw-volume

Basic interface to PipeWire volume controls
MIT License
77 stars 10 forks source link

Doesn't work when audio is playing #12

Closed Venator777 closed 2 years ago

Venator777 commented 2 years ago

Everything works as expected when no audio is playing. However, if I for example have firefox open with any audio playing, any attempt to run it results in this message:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: failed to determine default audio sink', src/main.rs:319:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted

In the case of Firefox, stopping the audio does not help, Firefox has to be fully closed before it starts working again. In the case of some other programs, as long as the audio is not playing, I can still change the volume.

I also noticed that the volume is really loud, a 'normal' volume level would be at around 0.5% but I think this is something with my alsa setup and not related to the issue.

smasher164 commented 2 years ago

Thanks for reporting this! I’m going to try to reproduce and see if this is alsa-specific.

A couple questions if you don’t mind:

Venator777 commented 2 years ago
smasher164 commented 2 years ago

https://github.com/smasher164/pw-volume/releases

Venator777 commented 2 years ago

Ok so the issue occurs on both versions. I just double checked and pw-cli does work when volume is playing, if it helps the exact command I use is: pw-cli s 41 Props '{ mute: false, channelVolumes: [ x.xxx, x.xxx ] }'

smasher164 commented 2 years ago

Just so you know, I haven't forgotten about this. I just recently joined a new job, and it'll take some time before I can wind down and attend to this. Hope you can understand!

smasher164 commented 2 years ago

If you're able to run the main branch, please let me know if it fixes your issue.

Thanks!

Venator777 commented 2 years ago

Just built, yes this fixed the issue, thanks a lot!