Port to fluidsynth 2.0.0 API
ClosedPublic

Authored by tommo on Fri, Jan 10, 12:09 PM.

Details

Summary

This includes necessary adaptations for fluidsynth 2.0. All changes are backward-compatible to fluidsynth 1.1. For details, see:

http://www.fluidsynth.org/api/index.html#NewIn2_0_0

Diff Detail

Repository
R163 Minuet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tommo created this revision.Fri, Jan 10, 12:09 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptFri, Jan 10, 12:09 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
tommo requested review of this revision.Fri, Jan 10, 12:09 PM
aacid added a subscriber: aacid.Fri, Jan 10, 11:37 PM

Just to be clear, you're saying that this will compile and work both with fluidsynth 2.0 and fluidsynth 1.1, right?

aacid added a comment.Thu, Jan 16, 9:51 PM

If i add this patch it crashes just starting the app for me

It seems to me like an if guarding that call would be a good idea?

Doesn't it crash for you?

#0 0x00007fffeae79c87 in fluid_sequencer_unregister_client () from /usr/lib/libfluidsynth.so.2
#1 0x00007fffeb36ffb9 in FluidSynthSoundController::deleteEngine (this=0x5555556e4e50) at /home/tsdgeos/devel/kde/minuet/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp:249
#2 0x00007fffeb36fd9e in FluidSynthSoundController::resetEngine (this=0x5555556e4e50) at /home/tsdgeos/devel/kde/minuet/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp:221
#3 0x00007fffeb36e9ee in FluidSynthSoundController::FluidSynthSoundController (this=0x5555556e4e50, parent=0x0) at /home/tsdgeos/devel/kde/minuet/src/plugins/fluidsynthsoundcontroller/fluidsynthsoundcontroller.cpp:62
#4 0x00007fffeb36e169 in qt_plugin_instance () at /home/tsdgeos/devel/kde/minuet/build/src/plugins/fluidsynthsoundcontroller/minuetfluidsynthsoundcontroller_autogen/EWIEGA46WW/moc_fluidsynthsoundcontroller.cpp:683
#5 0x00007ffff619ee3b in QPluginLoader::instance() () from /usr/lib/libQt5Core.so.5
#6 0x000055555555f970 in Minuet::PluginController::initialize (this=0x5555556d7920, core=0x5555556d78e0) at /home/tsdgeos/devel/kde/minuet/src/app/plugincontroller.cpp:77
#7 0x000055555555d10c in Minuet::Core::Core (this=0x5555556d78e0, parent=0x0) at /home/tsdgeos/devel/kde/minuet/src/app/core.cpp:87
#8 0x000055555555cf8e in Minuet::Core::initialize () at /home/tsdgeos/devel/kde/minuet/src/app/core.cpp:49
#9 0x000055555555c81d in main (argc=1, argv=0x7fffffffdbb8) at /home/tsdgeos/devel/kde/minuet/src/app/main.cpp:71

tommo updated this revision to Diff 73745.Fri, Jan 17, 8:27 AM

You're right. Sorry. I had an orphaned fluidsynth install in /usr/local/ which caused the wrong .so to be used at runtime.

Also, it turns out that explicit sequencer client unregistering causes a double free in fluidsynth 1.1.11. So I only do this for version 2 and newer.

aacid accepted this revision.Fri, Jan 17, 11:30 PM

ok, this looks better thanks :)

Commiting to master in a minute

This revision is now accepted and ready to land.Fri, Jan 17, 11:30 PM
This revision was automatically updated to reflect the committed changes.