summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-06-06 18:57:16 +0200
committerAki <please@ignore.pl>2022-06-06 18:57:16 +0200
commit0aa0477e340f605ce1ab69e2e79000cddcb13711 (patch)
tree3378fc8501b10a58f5f72c7af73d306d77ab53a7
parent50650380dedd160121c199cdb399e590a61c7e52 (diff)
downloadhwd-0aa0477e340f605ce1ab69e2e79000cddcb13711.zip
hwd-0aa0477e340f605ce1ab69e2e79000cddcb13711.tar.gz
hwd-0aa0477e340f605ce1ab69e2e79000cddcb13711.tar.bz2
Adjusted sinewave example to continuously output samples if no -n
-rw-r--r--examples/sinewave/sinewave.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sinewave/sinewave.cpp b/examples/sinewave/sinewave.cpp
index afffc82..519ed46 100644
--- a/examples/sinewave/sinewave.cpp
+++ b/examples/sinewave/sinewave.cpp
@@ -59,7 +59,7 @@ int main(int argc, char* argv[])
}
while (keep_running) {
- if (i >= samples) break;
+ if (samples != 0 && i >= samples) break;
i++;
const auto endTime = Clock::now() + interval;
std::cout << hwd::sinewave::get_point() << std::endl;