diff options
Diffstat (limited to 'tests/ingen_test.cpp')
-rw-r--r-- | tests/ingen_test.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index 12e9e9f9..bb013ebd 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -135,10 +135,16 @@ ingen_try(bool cond, const char* msg) static void flush_events(Ingen::World* world) { + static const uint32_t block_length = 4096; + int count = 0; + uint32_t offset = 0; while (world->engine()->pending_events()) { - world->engine()->run(4096); + world->engine()->locate(offset, block_length); + world->engine()->run(block_length); world->engine()->main_iteration(); g_usleep(1000); + ++count; + offset += block_length; } } @@ -250,7 +256,7 @@ main(int argc, char** argv) NULL, NULL, atom->type, atom->size, LV2_ATOM_BODY(atom)) << endl; #endif - if (!atom_reader.write((const LV2_Atom*)out.buf)) { + if (!atom_reader.write((const LV2_Atom*)out.buf, n_events + 1)) { return EXIT_FAILURE; } |