Fix ALSA latency (causing ALSA not to block).

With arbitrarily large latency setting (unsigned int)-1, ALSA will happily
accept all the samples we want to throw at it.

Reducing to a reasonably long (but still sub-second) value of 100ms, we
cause ALSA writes to block and work properly with --tx-carrier.
This commit is contained in:
Nick Moriarty 2015-04-16 22:29:27 +01:00
parent ecebf013f0
commit 8915ce1525
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ sa_alsa_open_stream(
channels,
rate,
1 /* soft_resample (allow) */,
(unsigned int)-1 /* latency (allow max to avoid underruns) */);
100000 /* latency (us) */);
if (error) {
fprintf(stderr, "E: %s\n", snd_strerror(error));
snd_pcm_close(pcm);