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

Fix pulseshitter streaming the microphone when locale is not English #20

Closed LyesSaadi closed 1 year ago

LyesSaadi commented 1 year ago

Previously, pulshitter failed to detect when a process closed its sink when parec's output was translated to another language. This forces parec's output to be in English, solving the issue.

LyesSaadi commented 1 year ago

Confirmed this fixes the issue on my side from my quick testing.

Enitoni commented 1 year ago

Before I merge this, could you make sure you've added the LANG=C env variable to all the pactl spawning instances containing LC_NUMERIC in /audio/pulse.rs ?

These commands are also sensitive to localization, so just to be on the safe side they should also be normalized to english.

LyesSaadi commented 1 year ago

Good idea ! Will do this !

LyesSaadi commented 1 year ago

Oh this panics:

thread 'main' panicked at 'spawns pactl: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/audio/pulse.rs:616:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
LyesSaadi commented 1 year ago

Oh, no, my bad, this is error is my fault.

LyesSaadi commented 1 year ago

Yeah, I can confirm it works fine on my side !

Enitoni commented 1 year ago

Appreciated! Thanks.