Of course, it is good also in curved time :) On Wed, Aug 08, 2012 at 12:25:00PM -0400, Steven Yi wrote: > Question: Is this code applicable for when Csound is non-realtime and > rendering to file? It would be good if this is generalized and used where > applicable. It would then be easier to update all with same code should > the writing be done asynchronously. > > Otherwise, fantastic Tito! > > steven > > On Wed, Aug 8, 2012 at 12:20 PM, wrote: > > > Sounds good > > > > ] > > > lisp is idle for some minutes and I have the code for an efficient > > `fout'. > > > With the current version we have `kr' sf-write-calls in 1 second. > > > > > > Here I use the follow value for the buffer size: > > > > > > (int(512 / ksmps) + 1) * ksmps * fout_channels > > > > > > if ksmps < 512, and > > > > > > ksmps * fout_channels > > > > > > if ksmps >= 512. > > > > > > sf_write is called when there are at least 512*fout_channels samples in > > > the buffer, if ksmps < 512, or ksmps*fout_channels samples if ksmps >= > > > 512. > > > > > > In this way we have max `sr/512' sf-write-calls in 1 second. > > > With sr=44100, ceiling(sr/512) = 87. > > > > > > Added also `fout_flush_callback' to write the possible not empty buffer > > at > > > the end of the instance. > > > > > > If you think that it is good, I'll also change `foutk' and git-push > > > tomorrow. > > > > > > tito ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net