mirror of
https://github.com/D-Modem/app.git
synced 2026-11-28 17:38:05 -08:00
- native-test's line tools (fax_line, codec_line, t30_line) at LINE_SPEED times the sample clock (line_speed.h); the fax tests ask for 2x (DMODEM_LINE_SPEED, 1 a phone line's pace): 4x leaves the DTE a quarter second for what class 1 times in a second, too tight on a busy machine - t30_line's first page some 70 KB in MH, not 220 KB (still two ECM blocks) - the Kermit and lrzsz interop tests' byte traces only when asked (KERMIT_TRACE, TRANSFER_TRACE): a file opened for each chunk; Kermit's big file 64 KB - two test JVMs at once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
36 lines
919 B
C
36 lines
919 B
C
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
* Copyright (C) 2026 Neo-Desktop
|
|
*
|
|
* line_speed.h - how fast the test lines run (fax_line, codec_line,
|
|
* t30_line): at the sample clock, as a phone line does,
|
|
* or LINE_SPEED=<x> times it (the tests' shorter
|
|
* calls: the DTE's timing, a fax program's T.30, then
|
|
* x times as slow beside the line's); MODEM_REALTIME=0
|
|
* as fast as it goes
|
|
*/
|
|
|
|
#ifndef LINE_SPEED_H
|
|
#define LINE_SPEED_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "pipe_modem.h"
|
|
|
|
static inline void line_speed(dmd::PipeModem &m)
|
|
{
|
|
const char *s = getenv("LINE_SPEED");
|
|
double x = s ? atof(s) : 1;
|
|
if (getenv("MODEM_REALTIME") && !atoi(getenv("MODEM_REALTIME"))) {
|
|
m.set_realtime(false);
|
|
m.set_speed(0);
|
|
} else if (x > 1) {
|
|
m.set_realtime(false);
|
|
m.set_speed(x);
|
|
} else {
|
|
m.set_realtime(true);
|
|
}
|
|
}
|
|
|
|
#endif
|