- // TxDelay and output latency have the same effect - account for whichever is bigger.
- // We want our sound card DAC hitting preamble right when PTT fully engages.
- // The modulator calls the shots here - TNC hands over Preamble and asserts PTT, then
- // waits to be told when transmission will be complete. This estimate will not be
- // made and delivered until we generate the EOT frame.
- self.tx_delay_padding = tx_delay_samples.max(self.output_latency);
+ // Our output latency gives us a certain amount of unavoidable TxDelay
+ // So only introduce artificial delay if the requested TxDelay exceeds that
+ self.tx_delay_padding = tx_delay_samples.saturating_sub(self.output_latency);