diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-06-05 18:07:22 +0200 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-06-05 18:07:22 +0200 |
| commit | cac2883931aff61dd4d39061ff5aec4edafd0684 (patch) | |
| tree | cff4d7732887a3f3f945e875d8f49ddc80bc607d /Makefile | |
| parent | 069a0fd86f9bb239476235ed795a3a1d330d203e (diff) | |
| download | applause2-cac2883931aff61dd4d39061ff5aec4edafd0684.tar.gz | |
revised stream syncing: stream samples are cached now
* the syncing had some serious issues: It was not possible to repeat
a synced stream since its tick() iterators were not independant.
E.g. Foo = Bar:sync(); (Foo..Foo):play()
would not have the expected result (Bar..Bar):play()
* syncing required the Stream.reset() mechanism
* instead of syncing, we now do caching (CachedStream) in a dedicated
sampleCache table. Instead of alternating the clock signal, the
cache is now simply table.clear()ed for each output sample.
This results in some allocation overhead on the first sample since
sampleCache will not yet have its final size.
(Although this overhead could be avoided by counting the
number of cached streams recursively and allocating sampleCache
using table.new())
* SndfileStream suffered from similar problems, it could not be repeated
because every object's tick() shared the same handle.
Instead every tick() now opens its own handle.
This means that using the same SndfileStream multiple times no longer
requires explicit syncing/caching and SndfileStreams can be repeated.
On the down-side we must check whether the file changed after
the initial object construction.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
