Enitoni / pulseshitter

An overengineered workaround to Discord not supporting audio when screensharing on Linux.
Mozilla Public License 2.0
349 stars 8 forks source link

pactl can return a malformed json, resulting in a panic #7

Closed IntQuant closed 1 year ago

IntQuant commented 1 year ago

In case your locale happens to use "," instead of "." as a decimal separator, pactl tends to return a malformed json, leading to a panic

thread 'main' panicked at 'parses pactl output: Error("key must be a string", line: 1, column: 438)', src/audio/pulse.rs:643:69

This can be circumvented by starting pulseshitter like this

LC_NUMERIC=C ./pulseshitter

It actually has been already fixed in here 11 months ago, but obviously it's way too recent of a fix to be included in some distros.

IntQuant commented 1 year ago

This can be fixed by passing this env variable to pactl. Should I do a pull request for this?

Enitoni commented 1 year ago

That's interesting, thank you for pointing this out. A pull request would be much appreciated!