aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-19 21:10:50 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-19 21:10:50 +0100
commitba5e8e8382f22df26245d6702019f80fb63fcd18 (patch)
tree2ab7fec3a7582bdb38642ec02fbb6fffd0c7fea4
parentadd option to send to file (diff)
downloadfodtmf-ba5e8e8382f22df26245d6702019f80fb63fcd18.tar.gz
fodtmf-ba5e8e8382f22df26245d6702019f80fb63fcd18.tar.bz2
fodtmf-ba5e8e8382f22df26245d6702019f80fb63fcd18.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--TODO1
-rw-r--r--src/send.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..41815b5
--- /dev/null
+++ b/TODO
@@ -0,0 +1 @@
+Get rid of that clicking sound.
diff --git a/src/send.c b/src/send.c
index 166a3b8..b841e1f 100644
--- a/src/send.c
+++ b/src/send.c
@@ -455,11 +455,13 @@ int main(int argc, char* argv[])
code = alloca(code_n * sizeof(*code));
/* Set up audio. */
- if (output_fd < 0)
+ if (output_fd >= 0)
goto no_audio;
r = snd_pcm_open(&sound_handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
if (r < 0)
return fprintf(stderr, "%s: snd_pcm_open: %s\n", *argv, snd_strerror(r)), 1;
+ if (sound_handle == NULL)
+ perror("snd_pcm_open");
/* Configure audio. */
r = snd_pcm_set_params(sound_handle, FORMAT, SND_PCM_ACCESS_RW_INTERLEAVED, 1 /* channels */,
SAMPLE_RATE, 1 /* allow resampling? */, LATENCY);