X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Fao-view%2Faoview_flite.c;h=00e6c9deeaae0f3a0acd207f6933f42178a6efe6;hp=e1b758983d171211d5ee9ade5ec578e7dfa02575;hb=641e76c5d419dab057298541b3a7546877643198;hpb=0c771d999914f9d17c723900f2987acc45fd0fbb diff --git a/ao-tools/ao-view/aoview_flite.c b/ao-tools/ao-view/aoview_flite.c index e1b75898..00e6c9de 100644 --- a/ao-tools/ao-view/aoview_flite.c +++ b/ao-tools/ao-view/aoview_flite.c @@ -20,7 +20,7 @@ #include "aoview.h" #include -cst_voice *register_cmu_us_kal(); +cst_voice *register_cmu_us_kal16(); static cst_voice *voice; static FILE *pipe_write; @@ -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; @@ -120,7 +118,7 @@ aoview_flite_start(void) if (!once) { flite_init(); - voice = register_cmu_us_kal(); + voice = register_cmu_us_kal16(); if (!voice) { perror("register voice"); exit(1);