McMartin/FRUT

Invalid Audio IO Settings in Standalone Linux Project

pknock-Fender opened this issue · 4 comments

I have a standalone Linux Juce project that I've converted to cmake via FRUT, and it doesn't populate the Audio/Midi settings with the same audio IO settings. None of the available settings work and selecting any of them results in the error shown below. Is this a bug or is there something additional I need in my CMakeLists.txt configuration? Could this have something to do with JACK/ALSA?

IO settings when built with Juce/make:

io settings no cmake

IO settings when built with FRUT/cmake:

io settings cmake

Error:

If I select any of the IO options in the cmake version, they all result in the same error being shown.
image

System Info:

OS: Ubuntu 20.04.4 LTS
cmake Version: 3.4
JUCE Version: v6.0.7
ALSA Version: k5.15.0-46-generic
JACK Enabled: Yes

Hi @pknock-Fender

Thank you for using FRUT!

Could you please attach (in a new comment):

  • the .jucer project file or the Makefile generated by Projucer, and
  • the CMakeLists.txt file you use with FRUT?

Feel free to edit/remove any sensitive information from these files. You might have to append the .txt extension to make GitHub accept the attachments.

With these files, I should be able to figure out what is different between the two ways of building your project.

Thanks so much for your help @McMartin. I've taken a little more time to narrow it down, and I've found that the problem is in trying to link libtorch into the project.

From what I understand, after generating the CMakeLists.txt file, in order to link libtorch, I need to do the following. The example I followed can be found here and here.

  • In CMakeLists.txt, add:
find_package(Torch REQUIRED)
...

# Note that this occurs after the jucer_project_end() line.
target_link_libraries("<TARGET_NAME>_Shared_Code" PRIVATE torch)
  • When building, do the following (on linux):
    cmake .. -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/path/to/libtorch ..

Here are the jucer and CMakeLists files. It's all fairly boilerplate except for a couple extra search paths in the jucer proejct.
CMakeLists.txt
MicroTCN.txt

If I don't link libtorch, I get the settings I expect, but I won't be able to use it in my plugin. All the examples I've looked at in figuring out how to link libtorch use the above modifications to CMakeLists to do it. I haven't been able to successfully link libtorch in the projucer, so I don't have a direct comparison in that regard.

Hi @pknock-Fender

I don't see how linking libtorch is related to the "Invalid Audio IO Settings" you originally reported. If the "Invalid Audio IO Settings" have been fixed, please close this issue. I'm happy to discuss linking libtorch in a new issue.

Sorry about that. Something I considered trying is to compile it as a VST instead of standalone and see if I can get it to work that way. Either way, I'll follow up with this. Thanks again for your help