diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-19 21:10:50 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-19 21:10:50 +0100 |
commit | ba5e8e8382f22df26245d6702019f80fb63fcd18 (patch) | |
tree | 2ab7fec3a7582bdb38642ec02fbb6fffd0c7fea4 | |
parent | add option to send to file (diff) | |
download | fodtmf-ba5e8e8382f22df26245d6702019f80fb63fcd18.tar.gz fodtmf-ba5e8e8382f22df26245d6702019f80fb63fcd18.tar.bz2 fodtmf-ba5e8e8382f22df26245d6702019f80fb63fcd18.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | src/send.c | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -0,0 +1 @@ +Get rid of that clicking sound. @@ -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); |