Add changing ampl

This commit is contained in:
2026-02-24 13:13:00 +01:00
parent 25c4594196
commit 64c862cb71

View File

@@ -33,6 +33,15 @@ int main(int /*argc*/, const char* /*argv*/[])
// Set the noise amplitude to 0.75
channel.setPropertyValue("NoiseAmplitude", 0.75);
double amplStep = 0.1;
for (int i = 0; i < 200; ++i)
{
std::this_thread::sleep_for(std::chrono::milliseconds(25));
const double ampl = channel.getPropertyValue("Amplitude");
if (9.95 < ampl || ampl < 1.05)
amplStep *= -1;
channel.setPropertyValue("Amplitude", ampl + amplStep);
}
std::this_thread::sleep_for(5s);
return 0;
}