This gets rid of all bse module locks in the fluid synth code, by using one 
fluid synth instance per track.

I observed that if we load the soundfont every time the user presses play, this 
can be slow (50ms to load fluid r2 * number of soundfont tracks), so this keeps 
the fluid synth instances even after the project stops playing, and re-uses the 
instances on play.

What this doesn't implement is changing the soundfont on a track while the 
project is playing (the gui doesn't let me do this anyway), but this could be 
implemented by preparing a new fluid_synth instance and exchanging it on the 
fly using an engine job.

I believe that this is the best/correct way to do it, better than 
https://github.com/tim-janik/beast/pull/85

You can view, comment on, or merge this pull request online at:

  https://github.com/tim-janik/beast/pull/102

-- Commit Summary --

  * BSE: SF2: use one fluid_synth_t per track
  * BSE: SF2: clean up old unused code
  * BSE: SF2: remove unused mutex
  * BSE: SF2: use module data free function
  * config-checks.mk: require the latest fluidsynth version, 2.0.5
  * BSE: SF2: use fluid_synth_process() instead of deprecated function
  * BSE: SF2: cleanup: fix leak, remove debugging output
  * BSE: SF2: update documentation block.
  * BSE: SF2: don't reload the soundfont every time the user presses play

-- File Changes --

    M bse/bsesoundfont.cc (10)
    M bse/bsesoundfont.hh (2)
    M bse/bsesoundfontosc.cc (293)
    M bse/bsesoundfontosc.hh (16)
    M bse/bsesoundfontrepo.cc (75)
    M bse/bsesoundfontrepo.hh (27)
    M config-checks.mk (2)

-- Patch Links --

https://github.com/tim-janik/beast/pull/102.patch
https://github.com/tim-janik/beast/pull/102.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tim-janik/beast/pull/102
_______________________________________________
beast mailing list
beast@gnome.org
https://mail.gnome.org/mailman/listinfo/beast

Reply via email to