mirror of
https://git.code.sf.net/p/fldigi/fldigi
synced 2026-08-13 17:47:54 -04:00
Olivia 2 tones
* correct trailing edge cutoff of postamble tones
This commit is contained in:
parent
f3ed9232e8
commit
f77503a870
2 changed files with 7 additions and 8 deletions
|
|
@ -122,11 +122,11 @@ void olivia::send_tones()
|
|||
|
||||
preamblephase = 0;
|
||||
for (int i = 0; i < SR4; i++)
|
||||
tonebuff[2*SR4 + i] = tonebuff[i] = 0.9 * nco(freqa) * ampshape[i];
|
||||
tonebuff[2*SR4 + i] = tonebuff[i] = nco(freqa) * ampshape[i];
|
||||
|
||||
preamblephase = 0;
|
||||
for (int i = 0; i < SR4; i++)
|
||||
tonebuff[3*SR4 + i] = tonebuff[SR4 + i] = 0.9 * nco(freqb) * ampshape[i];
|
||||
tonebuff[3*SR4 + i] = tonebuff[SR4 + i] = nco(freqb) * ampshape[i];
|
||||
|
||||
for (int j = 0; j < TONE_DURATION; j += SCBLOCKSIZE)
|
||||
ModulateXmtr(&tonebuff[j], SCBLOCKSIZE);
|
||||
|
|
@ -186,7 +186,6 @@ int olivia::tx_process()
|
|||
// modem already has that many characters buffered, don't try
|
||||
// to read any more. If stopflag is set, we will always read
|
||||
// whatever there is.
|
||||
|
||||
if (stopflag || (Tx->GetReadReady() < Tx->BitsPerSymbol)) {
|
||||
if (!stopflag && (c = get_tx_char()) == GET_TX_CHAR_ETX)
|
||||
stopflag = true;
|
||||
|
|
@ -213,14 +212,14 @@ int olivia::tx_process()
|
|||
if (c > 0)
|
||||
put_echo_char(c);
|
||||
|
||||
if ((len = Tx->Output(txfbuffer)) > 0) {
|
||||
for (int i = 0; i < len; i++) txfbuffer[i] *= 0.9;
|
||||
if ((len = Tx->Output(txfbuffer)) > 0)
|
||||
ModulateXmtr(txfbuffer, len);
|
||||
}
|
||||
|
||||
if (stopflag && Tx->DoPostambleYet() == 1 && postamblesent != 1) {
|
||||
postamblesent = 1;
|
||||
send_tones();
|
||||
memset(tonebuff, 0, sizeof(*tonebuff) * SCBLOCKSIZE);
|
||||
ModulateXmtr(tonebuff, SCBLOCKSIZE);
|
||||
}
|
||||
|
||||
if (!Tx->Running()) {
|
||||
|
|
|
|||
|
|
@ -1758,7 +1758,7 @@ size_t SoundPort::resample_write(float* buf, size_t count)
|
|||
pa_perror(3, "Portaudio write error #3");
|
||||
throw SndException("Portaudio write error 3");
|
||||
}
|
||||
if (active_modem->get_stopflag()) return count;
|
||||
// if (active_modem->get_stopflag()) return count;
|
||||
|
||||
sd[1].rb->write(wbuf, sd[1].params.channelCount * count);
|
||||
|
||||
|
|
@ -2414,7 +2414,7 @@ size_t SoundPulse::resample_write(float* buf, size_t count)
|
|||
|
||||
if (!active_modem) return count;
|
||||
|
||||
if (active_modem->get_stopflag()) return count;
|
||||
// if (active_modem->get_stopflag()) return count;
|
||||
|
||||
if (pa_simple_write(sd[1].stream, wbuf, count * sd[1].stream_params.channels * sizeof(float), &err) == -1)
|
||||
throw SndPulseException(err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue