Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing delete_fluid_midi_driver on Synth.delete()? #89

Open
EmoonX opened this issue Jan 1, 2025 · 0 comments
Open

Missing delete_fluid_midi_driver on Synth.delete()? #89

EmoonX opened this issue Jan 1, 2025 · 0 comments

Comments

@EmoonX
Copy link

EmoonX commented Jan 1, 2025

When killing a FluidSynth instance, a few deletion routines are called:

if self.audio_driver:
    delete_fluid_audio_driver(self.audio_driver)
delete_fluid_synth(self.synth)
delete_fluid_settings(self.settings)

However, delete_fluid_midi_driver isn't among them. As a matter of fact, it isn't called anywhere in the code.

Listing MIDI output ports shows the FS instance still there:

$ aplaymidi -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
128:0    FLUID Synth (2085)               Synth input port (2085:0)

By defining the aforementioned binding (delete_fluid_midi_driver = cfunc('delete_fluid_midi_driver', c_void_p, ('driver', c_void_p, 1)) and adding it to the deletion routines (delete_fluid_midi_driver(self.midi_driver)), the instance is finally cleared as it should:

$ aplaymidi -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant