First, my aplogies to this list that I volunteered to do this mod to fluid~ and probably almost a year later, haven't had the time to tackle it yet.
Well, I might actually have a few hours later on today to work on this, and just would like to see if the work would still be revelant.
The motivation in my case is to use a large piano sounfont, loaded only once, and to use multiple instances of fluid~ to seperately process each voice.
The simplest idea I came up with would be to simply compare the file strings, and if the same, to share the soundfount rather than loading it again.
If I don't hear from anyone about a better approach, I hope to go ahead and tackle this.
One related questions - is it safe to use C++ STL as is, or should I redefine the allocator to use pd_new (or whatever it's called)?
Larry
Hallo, Larry Troxler hat gesagt: // Larry Troxler wrote:
The motivation in my case is to use a large piano sounfont, loaded only once, and to use multiple instances of fluid~ to seperately process each voice.
The simplest idea I came up with would be to simply compare the file strings, and if the same, to share the soundfount rather than loading it again.
Actually, if you use an absolute path, this sounds like a good and simple solution.
One related questions - is it safe to use C++ STL as is, or should I redefine the allocator to use pd_new (or whatever it's called)?
Recently Thomas wrote something about flext redefining new and delete anyway, maybe he can add some details on this?
Frank Barknecht _ ______footils.org__
_ __latest track: fqdn _ http://footils.org/cms/show/38
One related questions - is it safe to use C++ STL as is, or should I
redefine
the allocator to use pd_new (or whatever it's called)?
Recently Thomas wrote something about flext redefining new and delete anyway, maybe he can add some details on this?
I think it is in principle "safe" to use the C library new and delete (because if i remember correctly pd currently also uses malloc and free which is the same), but it's probably recommendable to define the STL allocators to use getbytes and freebytes, because the PD implementation might change to something faster/better. The problem is, that PD memory allocation has a small overhead with C++, since you need the size of allocated memory also for freeing it (it's used for debugging of memory usage) - therefore you need to store this bytecount too. You can look at the flext solution of this in flsupport.h.
best greetings, Thomas