summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ao-tools/ao-view/aoview_flite.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ao-tools/ao-view/aoview_flite.c b/ao-tools/ao-view/aoview_flite.c
index e1b75898..bc702b0f 100644
--- 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;