diff options
author | David Robillard <d@drobilla.net> | 2025-01-10 09:51:00 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-01-10 09:51:00 -0500 |
commit | 7243389db613a8eabd804cb1a1da1cb0aaf81130 (patch) | |
tree | 9d2d14d69250897fa8f0dfa961acc17ee7ce2e55 | |
parent | e1e0b34271d1b2c478509a5d6b37d15d774a7650 (diff) | |
download | lilv-7243389db613a8eabd804cb1a1da1cb0aaf81130.tar.gz lilv-7243389db613a8eabd804cb1a1da1cb0aaf81130.tar.bz2 lilv-7243389db613a8eabd804cb1a1da1cb0aaf81130.zip |
Reduce variable scope
-rw-r--r-- | tools/lv2bench.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lv2bench.c b/tools/lv2bench.c index 9eb668d..21519ed 100644 --- a/tools/lv2bench.c +++ b/tools/lv2bench.c @@ -153,11 +153,11 @@ bench(const LilvPlugin* p, uint32_t sample_count, uint32_t block_size) } } - double elapsed = 0.0; if (!skip_plugin) { lilv_instance_activate(instance); struct timespec ts = bench_start(); + for (uint32_t i = 0; i < (sample_count / block_size); ++i) { seq_in.atom.size = sizeof(LV2_Atom_Sequence_Body); seq_in.atom.type = uri_table_map(&uri_table, LV2_ATOM__Sequence); @@ -166,7 +166,8 @@ bench(const LilvPlugin* p, uint32_t sample_count, uint32_t block_size) lilv_instance_run(instance, block_size); } - elapsed = bench_end(&ts); + + const double elapsed = bench_end(&ts); if (full_output) { printf("%u %u ", block_size, sample_count); |