Do not emit 0.5 sec flush for audio file output
This commit is contained in:
parent
513a11d454
commit
c2e4d9e1c4
|
@ -52,6 +52,7 @@ int tx_trailer_bits_len = 2;
|
||||||
simpleaudio *tx_sa_out;
|
simpleaudio *tx_sa_out;
|
||||||
float tx_bfsk_mark_f;
|
float tx_bfsk_mark_f;
|
||||||
unsigned int tx_bit_nsamples;
|
unsigned int tx_bit_nsamples;
|
||||||
|
unsigned int tx_flush_nsamples;
|
||||||
|
|
||||||
void
|
void
|
||||||
tx_stop_transmit_sighandler( int sig )
|
tx_stop_transmit_sighandler( int sig )
|
||||||
|
@ -62,9 +63,8 @@ tx_stop_transmit_sighandler( int sig )
|
||||||
for ( j=0; j<tx_trailer_bits_len; j++ )
|
for ( j=0; j<tx_trailer_bits_len; j++ )
|
||||||
simpleaudio_tone(tx_sa_out, tx_bfsk_mark_f, tx_bit_nsamples);
|
simpleaudio_tone(tx_sa_out, tx_bfsk_mark_f, tx_bit_nsamples);
|
||||||
|
|
||||||
// 0.5 sec of zero samples to flush - FIXME lame
|
if ( tx_flush_nsamples )
|
||||||
size_t sample_rate = simpleaudio_get_rate(tx_sa_out);
|
simpleaudio_tone(tx_sa_out, 0, tx_flush_nsamples);
|
||||||
simpleaudio_tone(tx_sa_out, 0, sample_rate/2);
|
|
||||||
|
|
||||||
tx_transmitting = 0;
|
tx_transmitting = 0;
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,10 @@ static void fsk_transmit_stdin(
|
||||||
tx_sa_out = sa_out;
|
tx_sa_out = sa_out;
|
||||||
tx_bfsk_mark_f = bfsk_mark_f;
|
tx_bfsk_mark_f = bfsk_mark_f;
|
||||||
tx_bit_nsamples = bit_nsamples;
|
tx_bit_nsamples = bit_nsamples;
|
||||||
|
if ( tx_interactive )
|
||||||
|
tx_flush_nsamples = sample_rate/2; // 0.5 sec of zero samples to flush
|
||||||
|
else
|
||||||
|
tx_flush_nsamples = 0;
|
||||||
|
|
||||||
// one-shot
|
// one-shot
|
||||||
struct itimerval itv = {
|
struct itimerval itv = {
|
||||||
|
|
Loading…
Reference in New Issue