[Top][All Lists]

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

Re: [fluid-dev] Unexpected fluid_synth_sfunload behavior

From: Peter Hanappe
Subject: Re: [fluid-dev] Unexpected fluid_synth_sfunload behavior
Date: Mon, 29 Mar 2004 09:35:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3

Hi Larry,

Indeed, fluid_synth_sfunload frees the soundfont. I think that is
appropriate since fluid_synth_sfload allocates it. I've updated the
documentation in the headers.

What you need is a fluid_synth_remove_sfont function, the counterpart
of fluid_synth_add_sfont. It currently does not exist in the API,
but it would not be hard to add.

I can add the function but I have to check whether adding this
to the API breaks ABI compatibility. I don't think it does but can
anyone confirm?


Larry Troxler wrote:
Hello. I am trying to modify the PD fluid~ external to share soundfonts among more than one fluid~ synth, and have run across a problem with using the API to do this.

I thought I could do it this way:

1) Use fluid_synth_sfload the first time the soundfont is loaded
2) Call fluid_synth_get_sfont_by_id to retreive its address
3) Call fluid_synth_add_sfont to add this soundfont to other synths
4) When deleteing a synth, call fluid_synth_sfunload to remove any shared synths from the synth that is about to be deleted.

The problem is with step #4. I was surprised to see that fluid_synth_sfunload frees the soundfont that it is removing, even though there is no mention of this in the function documentation. Should this be considered a bug in fluidsynth, or is this actually what some users expect to happen?

If this is the way it is supposed to work, is there a way of doing what I want to do?

Larry Troxler

fluid-dev mailing list

reply via email to

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