projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac4b8a7
)
ao-view: fix snd_pcm_open return checking
author
Keith Packard
<keithp@keithp.com>
Wed, 7 Oct 2009 03:06:00 +0000
(20:06 -0700)
committer
Keith Packard
<keithp@keithp.com>
Wed, 7 Oct 2009 03:06:00 +0000
(20:06 -0700)
I don't know how this code was supposed to work before...
Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-view/aoview_flite.c
patch
|
blob
|
history
diff --git
a/ao-tools/ao-view/aoview_flite.c
b/ao-tools/ao-view/aoview_flite.c
index e1b758983d171211d5ee9ade5ec578e7dfa02575..bc702b0f4cd29275810a574636176378c9ac4a0a 100644
(file)
--- a/
ao-tools/ao-view/aoview_flite.c
+++ b/
ao-tools/ao-view/aoview_flite.c
@@
-42,12
+42,10
@@
aoview_flite_task(gpointer data)
err = snd_pcm_open(&alsa_handle, "default",
SND_PCM_STREAM_PLAYBACK, 0);
- if (err >= 0)
- {
- if (err < 0) {
- snd_pcm_close(alsa_handle);
- alsa_handle = 0;
- }
+ if (err < 0) {
+ fprintf(stderr, "alsa open failed %s\n",
+ strerror(-err));
+ alsa_handle = NULL;
}
rate = 0;
channels = 0;