On Fri, 2012-06-22 at 20:55 +0200, poljar (Damir Jelic) wrote: > @@ -1812,6 +1822,19 @@ int main(int argc, char *argv[]) { > action = SET_SINK_FORMATS; > formats = pa_xstrdup(argv[optind+2]); > > + } else if (pa_streq(argv[optind], "set-port-latency-offset")) { > + action = SET_PORT_LATENCY_OFFSET; > + > + if (argc != optind+4) { > + pa_log(_("You have to specify a card name/index, a port name and a latency offset")); > + goto quit; > + } > + > + card_name = pa_xstrdup(argv[optind+1]); > + port_name = pa_xstrdup(argv[optind+2]); > + if (pa_atod(argv[optind + 3], &latency_offset) < 0) > + latency_offset = 0; Please treat parsing failures as a fatal errors instead of silently using zero as the fallback. And parse the user input as an integer. -- Tanu