mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
main: set LC_NUMERIC to C
The webrtc backend of module-echo-cancel uses sscanf() to parse floating point numbers from module arguments, which didn't work when the locale used a comma for the decimal point. Setting the LC_NUMERIC locale variable to C makes the pulseaudio process use a period as the decimal point regardless of the user's locale configuration. Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/89
This commit is contained in:
parent
757eb26448
commit
d5d0803591
1 changed files with 6 additions and 0 deletions
|
|
@ -480,7 +480,13 @@ int main(int argc, char *argv[]) {
|
|||
pa_unblock_sigs(-1);
|
||||
pa_reset_priority();
|
||||
|
||||
/* Load locale from the environment. */
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
/* Set LC_NUMERIC to C so that floating point strings are consistently
|
||||
* formatted and parsed across locales. */
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
|
||||
pa_init_i18n();
|
||||
|
||||
conf = pa_daemon_conf_new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue