diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-03-27 17:56:47 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-03-27 18:10:30 +0300 |
commit | 22f88459f2950eb163a8844badd884b3e1d193cd (patch) | |
tree | 5f6be4d38bcb7993c727a3dd39b3db7cd221e70c /midi.lua | |
parent | 476261186fb6ca6bccd752546d18b2bd63eb1a64 (diff) | |
download | applause2-22f88459f2950eb163a8844badd884b3e1d193cd.tar.gz |
replaced Stream:foreach() with Stream:iter()
* This allows the native syntax `for f in Stream:iter() do ... end` without using lambda
functions.
Also you can use `break` and `return` statements.
* On the other hand we cannot exploit the extended xpcall() semantics and had to introduce
another lambda in Stream:play().
* In general the number of function calls per tick stays the same.
Stream:gtick() itself could be used as an iterator, but Stream:iter() adds checking for CTRL+C,
resetting of the sample cache and binding functions.
Diffstat (limited to 'midi.lua')
0 files changed, 0 insertions, 0 deletions