|
From: Christian S. <chr...@ep...> - 2003-08-11 15:38:09
|
Es geschah am Montag, 11. August 2003 15:44 als Benno Senoner schrieb: > Scrive Christian Schoenebeck <chr...@ep...>: > > Hi! > > > > I thought about adding mmap() support as a compile time option to the > > Akai and > > Giga libs. I would also recommend to place the sample head cache (for the > > first couple of sample chunks to allow instant triggering of the samples) > > directly into those libs, so the engine doesn't have to care about > > maintaining such things. What do you think? > > Hmm not sure if this would be a good idea (that the lib handles the caching > of the first samples). > The fact is that the playback engine will need to know about the > cached size, offset where to switch from ram to disk based playback etc > anyway, plus the engine could decide to cache different amounts of samples > depending on some factors thus I think it is better if your lib just > interprets all chunks and returns data structures describing the data > contained in them. > As for the chunks containing the actual samples it is sufficient to > export the offset (relative to the file) where they begin and the total > length. Hmmm, not sure if that's a good idea either :) Because you may have to e.g. uncompress the wave stream (not with Akai, but at least with gig files). Of course you can also do that within the engine, but IMO that wouldn't be that clean and I just thought it would be some kind of code overhead to let the engine maintain sample specific infos. Regarding the amount of cached samples: It doesn't make sense to me not to cache all sample heads, at least all those samples which belong to a program (/instrumen) that's currently in usage have to be cached. Or maybe I just don't know what you're getting at. Christian |