Report the instrument's automatable parameters to the host under a frozen id table, in signal-flow order, with real units
42 of 44 ids issued: pitch key-track and Trigger length stay reserved pending a live path. Master gain reclassified Live — it never reloaded.
This commit is contained in:
@@ -20,12 +20,6 @@ static int g_fail = 0;
|
||||
#define CHECK(cond) do { if(!(cond)) { \
|
||||
std::printf("FAIL line %d: %s\n", __LINE__, #cond); ++g_fail; } } while(0)
|
||||
|
||||
static std::string msLabel(double seconds) {
|
||||
char buf[24];
|
||||
formatEnvTimeMs(seconds, buf, sizeof(buf));
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
// The stage-time ceiling has TWO names — the overlay's schematic domain and the knob's — and they
|
||||
// must be the same number or a maxed knob stops landing on the canvas edge. Asserted, not assumed.
|
||||
static void testTheTwoCeilingNamesAreOneNumber() {
|
||||
@@ -406,28 +400,6 @@ static void testTheFilterFourKeepTheirIdentityTaper() {
|
||||
}
|
||||
}
|
||||
|
||||
// One unit, everywhere, across the formatter's whole range: a sub-millisecond value keeps a
|
||||
// decimal rather than reading as a bare zero, and a multi-second one stays in ms rather than
|
||||
// switching units mid-deck.
|
||||
static void testTimeConstantsAlwaysReadInMilliseconds() {
|
||||
CHECK(msLabel(0.0) == "0.0 ms");
|
||||
CHECK(msLabel(0.0005) == "0.5 ms"); // sub-millisecond
|
||||
CHECK(msLabel(0.0094) == "9.4 ms");
|
||||
CHECK(msLabel(0.012) == "12 ms"); // the use case's own reading
|
||||
CHECK(msLabel(0.25) == "250 ms");
|
||||
CHECK(msLabel(1.5) == "1500 ms"); // multi-second, still ms
|
||||
CHECK(msLabel(kEnvTimeMaxSeconds) == "10000 ms");
|
||||
// The 10 ms hinge belongs to the integer form, not the decimal one.
|
||||
CHECK(msLabel(0.01) == "10 ms");
|
||||
CHECK(msLabel(0.0099) == "9.9 ms");
|
||||
|
||||
// Never overruns a short buffer, and always terminates.
|
||||
char tiny[4];
|
||||
std::memset(tiny, 'x', sizeof(tiny));
|
||||
formatEnvTimeMs(1.5, tiny, sizeof(tiny));
|
||||
CHECK(tiny[3] == '\0');
|
||||
}
|
||||
|
||||
int main() {
|
||||
testTheTwoCeilingNamesAreOneNumber();
|
||||
testNormRoundTripsThroughEveryValueDomain();
|
||||
@@ -442,7 +414,6 @@ int main() {
|
||||
testShiftSnapsToAWholeUnitOfTheDisplayedValue();
|
||||
testAValueStoredUnderTheOldCeilingIsReadNotRewritten();
|
||||
testTheFilterFourKeepTheirIdentityTaper();
|
||||
testTimeConstantsAlwaysReadInMilliseconds();
|
||||
if (g_fail) {
|
||||
std::printf("%d FAILURE(S)\n", g_fail);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user