projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8ddf334
)
Check more alsa return statuses
author
Keith Packard
<keithp@keithp.com>
Sun, 9 Aug 2009 22:55:19 +0000
(15:55 -0700)
committer
Keith Packard
<keithp@keithp.com>
Sun, 9 Aug 2009 22:55:19 +0000
(15:55 -0700)
aoview/aoview_flite.c
patch
|
blob
|
history
diff --git
a/aoview/aoview_flite.c
b/aoview/aoview_flite.c
index 2673824dbdcfaf0780babfd20093fa4a0ca775a6..0ada4e141bd5fd37cc3989b1e4357da80538714d 100644
(file)
--- a/
aoview/aoview_flite.c
+++ b/
aoview/aoview_flite.c
@@
-58,15
+58,21
@@
aoview_flite_task(gpointer data)
{
rate = wave->sample_rate;
channels = wave->num_channels;
{
rate = wave->sample_rate;
channels = wave->num_channels;
- snd_pcm_set_params(alsa_handle,
- SND_PCM_FORMAT_S16,
- SND_PCM_ACCESS_RW_INTERLEAVED,
- channels,
- rate,
- 1,
- 100000);
+ err = snd_pcm_set_params(alsa_handle,
+ SND_PCM_FORMAT_S16,
+ SND_PCM_ACCESS_RW_INTERLEAVED,
+ channels,
+ rate,
+ 1,
+ 100000);
+ if (err < 0)
+ fprintf(stderr, "alsa set_params error %s\n",
+ strerror(-err));
}
}
- snd_pcm_prepare(alsa_handle);
+ err = snd_pcm_prepare(alsa_handle);
+ if (err < 0)
+ fprintf(stderr, "alsa pcm_prepare error %s\n",
+ strerror(-err));
err = snd_pcm_writei(alsa_handle,
wave->samples,
wave->num_samples);
err = snd_pcm_writei(alsa_handle,
wave->samples,
wave->num_samples);