Giter VIP home page Giter VIP logo

Comments (6)

Birch-san avatar Birch-san commented on August 11, 2024

thanks for telling me. I'd been doing all my testing in JUCE's audio plugin host, so I missed this. FL Studio is the most important DAW, so definitely need to get this working.

the issue reproduces for me also; I've tried adding an instance of the AU plugin to an FL Studio project. A white rectangle is rendered, mouse cursor beachballs.

I've attached a debugger to OsxFL, and I've hit "pause" on program execution to see where it's hung:

image

It gets to the first line of initialising FluidSynthModel, and hangs whilst trying to allocate a new_fluid_settings(). specifically it's waiting to acquire some kind of mutex. fluid_audio_settings is nearby, so I wonder whether this is the same deadlock that we had on the previous version of FluidSynth (FL Studio wants exclusive access to CoreAudio, so fluidsynth waits forever).

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

if indeed this is the same deadlock, then this is how I fixed it last time:

// deactivate all audio drivers in fluidsynth to avoid FL Studio deadlock when initialising CoreAudio
// after all: we only use fluidsynth to render blocks of audio. it doesn't output to audio driver.
const char *DRV[] {NULL};
fluid_audio_driver_register(DRV);

I've just now tried shuffling that line up by one so that it occurs before we attempt to create new_fluid_settings(), but that didn't help. maybe a different workaround is needed in FluidSynth2.

pretty much all configurability of fluidsynth requires that you first succeed in creating a settings object. we're a bit constrained because we can't even get as far as that.

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

okay yeah; it's the same deadlock as we had in fluidsynth1:

image

inside new_fluid_settings() fluidsynth invokes fluid_core_audio_driver_settings() to configure a default audio driver (which we don't want anyway). it tries to ask how many outputs the driver has, but FL Studio has a lock on the audio object, so we have to wait (forever) to get our answer.

I wonder why the usual trick (asking to disable all audio drivers) has stopped working in fluidsynth2.

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

oh, actually: my fix did work (moving the audio driver deregistration code). the only problem was that I wasn't doing a sufficiently clean build.

image

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

@lrcaldwell please tell me whether release 2.3.1 is working any better for you.

from juicysfplugin.

 avatar commented on August 11, 2024

@Birch-san 2.3.1 is now working in FL, still works in Ableton too. Thank you!~

from juicysfplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.