<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - module-echo-cancel: aec_method='webrtc', parsing mic_geometry value is locale dependent"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96819">96819</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>module-echo-cancel: aec_method='webrtc', parsing mic_geometry value is locale dependent
</td>
</tr>
<tr>
<th>Product</th>
<td>PulseAudio
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>modules
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pulseaudio-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ao2@ao2.it
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>pulseaudio-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>CC</th>
<td>lennart@poettering.net
</td>
</tr></table>
<p>
<div>
<pre>Hi,
I was trying setting mic_geometry for the PS3Eye
(<a href="http://m.eet.com/media/1111734/101016_move_teardown_5_700.jpg">http://m.eet.com/media/1111734/101016_move_teardown_5_700.jpg</a>), but it didn't
work at first:
# Set the first PS3Eye as the input device, it is important to do so _before_
# loading module-echo-cancel because the mic_geometry parameter is expected
to
# contain exactly as many points as are the channels of the source device
# master format.
PS3EYE_SOURCE=$(pactl list short sources | grep
"OmniVision_Technologies__Inc._USB_Camera" | head -1 | cut -f 2)
pactl set-default-source $PS3EYE_SOURCE
# Load the mic geometry.
pactl load-module module-echo-cancel use_master_format=1 aec_method='webrtc'
aec_args='"beamforming=1 mic_geometry=-0.03,0,0,-0.01,0,0,0.01,0,0,0.03,0,0"'
Loading the module failed:
pulseaudio[3640]: Failed to parse channel 0 in mic_geometry
pulseaudio[3640]: Failed to parse mic_geometry value
pulseaudio[3640]: [pulseaudio] module-echo-cancel.c: Failed to init AEC engine
pulseaudio[3640]: [pulseaudio] module.c: Failed to load module
"module-echo-cancel" (argument: "use_master_format=1 aec_method=webrtc
aec_args="beamforming=1 mic_geometry=-0.03,0,0,-0.01,0,0,0.01,0,0,0.03,0,0""):
initialization failed.
I figured out that was happening if pulseaudio was started in an environment
with a locale with a decimal point character different than a period, this was
the case for me because I use the "it_IT.utf8" locale and pulseaudio inherit it
by calling:
setlocale(LC_ALL, "")
The locale affects decimal number representation (floats values) and the issue
does not occur in other modules because echo-cancel/webrtc.cc is the only place
where a float is parsed with sscanf(), the other modules only have integer
parameters.
Launching pulseaudio with LC_NUMERIC=C works around the issue:
pulseaudio -k && LC_NUMERIC=C pulseaudio
Not sure what the best fix in the code is: setting LC_NUMERIC to "C", using
pa_atod (which can use strtod_l) or adding a locale independent sscanf wrapper.
Thanks,
Antonio</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>