[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Fluidsynth questions: 2.0.5 release / threading

From: Tom M.
Subject: Re: [fluid-dev] Fluidsynth questions: 2.0.5 release / threading
Date: Fri, 19 Apr 2019 11:14:11 +0200

> All right, I didn't even know that there is a sample cache so far. Suppose I
> load the same huge soundfont into two different fluid_synth_t objects. Will
> that double my memory usage?

No. Only the structural information of a soundfont is allocated for every 
synth, e.g. preset zones, instrument zones, their ranges, generators and 
modulators. But the huge rest of the soundfont, i.e. the sample data, are 
globally reference counted and allocated only once.

> And how is the situation if that soundfont was loaded from memory?

fluidsynth will treat soundfonts in memory just like usual files, there is no 
special treatment. I.e. fluidsynth will not use the samples already located in 
memory because fluidsynth takes ownership of every soundfont it loads. That 
means, fluidsynth will load the samples into the global sample cache just if it 
came from a file. Once loaded it closes the file or memory region.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]