[Stk] Memory Allocation in STK
Jeremy Jurksztowicz
jurksztowicz at gmail.com
Mon Feb 11 23:16:31 PST 2008
Hello,
I searched the archives with Google briefly, but my search terms came
up with no relevant info.
I noticed that in the Filter class, as well as Skini::Message, you are
using std::vector, which uses system memory allocation routines. In a
realtime threading context, system allocators are very dangerous,
because they could take more time to complete than the amount of time
the sound driver has to fill it's buffers. In the case of the Filter
class, if I want to safely change the coefficients during sound
processing, I have to take the filter class 'offline' (remove it from
the realtime sound stream somehow) adjust it's values and put it back.
Now, I know I understand basic realtime audio programming, but I am
not sure I understand STK (having just downloaded it recently), so I
may be missing something obvious (like a FAQ). Please forgive a
newbie, and point me to some info if you may.
Thanks,
Jeremy Jurksztowicz
--
Humans please remove _SPAMFILTER from address to reply.
More information about the Stk
mailing list