[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [fluid-dev] Question to fluidsynth specialists - Crash in "new_fluid
From: |
David Henningsson |
Subject: |
Re: [fluid-dev] Question to fluidsynth specialists - Crash in "new_fluid_settings" |
Date: |
Thu, 5 Nov 2015 11:57:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 2015-11-05 10:52, Reinhold Hoffmann wrote:
Hi fluid-dev team,
We at Notation Software (see www.notation.com <http://www.notation.com>)
use libfluidsynth under the LGPL license.
Hi Reinhold!
We have created the libfluidsynth dll libraries for "dsound" and
"portaudio" where we use the Steinberg's ASIO underneath.
Our default setting is with the "dsound" configuration. The customer can
optionally select the portaudio/ASIO settings for e.g. realtime recording.
We have a customer error report where the software crashes at the very
first fluidsynth statement "settings = new_fluid_settings();"
An investigation showed that the customer uses an exotic audio card
where the initialzation of the portaudio/ASIO/card driver software
causes a crash for whatever reason.
Certainly the better fix would be to fix portaudio/ASIO/card driver then :-)
When using a libfluidsynth library w/o portaudio support all works fine.
Issue:
=====
Even when only "dsound" is used, the portaudio software is started
by "new_fluid_settings()" and causes that crash.
When the libs are statically built with #define PORTAUDIO_SUPPORT, in
any case the call of "new_fluid_settings()" performs an initialization
of the portaudio/ASIO/sound card through "fluid_settings_add_option
(settings, "audio.driver", "portaudio")".
The reason PortAudio initializes even in a call to new_fluid_settings,
is to fill in proper options for audio.portaudio.device. This enables
the user to pick from a list of devices before instantiating the
portaudio driver.
This seems like a trade-off: on one side, it feels a bit unnecessary to
initialize portaudio (through the Pa_Initialize call) if you're not
going to use it, OTOH, it seems useful to have a list of portaudio
devices to choose from.
Trying to fill that list of devices only when you have set audio.driver
to "portaudio" should be doable, but would require some coding and I'm
not sure whether or not this is a good idea, given that other software
using libfluidsynth might expect the values to be filled in as they are now.
What do other people think?
Solution:
=======
A fault tolerant solution should activate "fluid_settings_add_option
(settings, "audio.driver", "*portaudio*")" ONLY when portaudio is
actively selected and not by default when the libs are statically built
at th beginning.
Question:
=======
As I have not found anything in any forum whether an option exist, is
there a possibility to dynamically set the "portaudio" initialization?
Such a solution is trivial but as mentioned we use libfluidsynth under
the LGPL license and want to keep the software unchanged.
Does anybody can provide an advice what would be the best way to address
this issue?
Any helpful advice is highly appreciated.
Best regards,
Reinhold
______________________________
*Notation Software Germany UG *
Dr. Reinhold Hoffmann
CEO and President
Eduard-Thoeny-Str. 6
D-86919 Utting am Ammersee
Germany
phone +49 8806 333 9800
fax +49 8806 333 9805
mobile +49 171 3036175
e-mail address@hidden <mailto:address@hidden>
web www.notation.com <http://www.notation.com/>
facebookwww.facebook.com/notationsoftware
<https://www.facebook.com/notationsoftware>
_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev