Merge lp:~pete-woods/hud/voice-bug-1177226 into lp:hud/13.10

Proposed by Pete Woods
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 253
Merged at revision: 253
Proposed branch: lp:~pete-woods/hud/voice-bug-1177226
Merge into: lp:hud/13.10
Diff against target: 27 lines (+12/-5)
1 file modified
src/hudsphinx.c (+12/-5)
To merge this branch: bzr merge lp:~pete-woods/hud/voice-bug-1177226
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Indicator Applet Developers Pending
Review via email: mp+162792@code.launchpad.net

Commit message

Fix voice on the device

Have to duplicate the call to cmd_ln_init to handle each case, it won't accept NULL arguments.

Description of the change

Fix voice on the device

Have to duplicate the call to cmd_ln_init to handle each case, it won't accept NULL arguments.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:253
http://jenkins.qa.ubuntu.com/job/hud-ci/17/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/hud-raring-amd64-ci/21
    SUCCESS: http://jenkins.qa.ubuntu.com/job/hud-raring-i386-ci/6

Click here to trigger a rebuild:
http://s-jenkins:8080/job/hud-ci/17/rebuild

review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/hudsphinx.c'
2--- src/hudsphinx.c 2013-03-13 17:31:24 +0000
3+++ src/hudsphinx.c 2013-05-07 15:01:49 +0000
4@@ -122,11 +122,18 @@
5 gchar *hmm = "/usr/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k";
6 gchar *dict = "/usr/share/pocketsphinx/model/lm/en_US/cmu07a.dic";
7
8- self->config = cmd_ln_init(NULL, sphinx_cmd_ln, TRUE,
9- "-hmm", hmm,
10- "-dict", dict,
11- "-adcdev", device == NULL ? "" : device,
12- NULL);
13+ if (device != NULL) {
14+ self->config = cmd_ln_init(NULL, sphinx_cmd_ln, TRUE,
15+ "-hmm", hmm,
16+ "-dict", dict,
17+ "-adcdev", device,
18+ NULL);
19+ } else {
20+ self->config = cmd_ln_init(NULL, sphinx_cmd_ln, TRUE,
21+ "-hmm", hmm,
22+ "-dict", dict,
23+ NULL);
24+ }
25
26 if (self->config == NULL) {
27 g_warning("Sphinx command line arguments failed to initialize");

Subscribers

People subscribed via source and target branches