juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.

Home Page:https://juce.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Compilation failure on Ubuntu Linux 20.04 with g++ 9.4.0 in juce_ALSA_linux.cpp

essej opened this issue · comments

Detailed steps on how to reproduce the bug

Compile error when building on Linux (g++ 9.4.0) with the following error:

/home/jesse/src/sonobus/deps/juce/modules/juce_audio_devices/native/juce_ALSA_linux.cpp: In member function ‘void juce::{anonymous}::ALSAThread::open(juce::BigInteger, juce::BigInteger, double, int)’:
/home/jesse/src/sonobus/deps/juce/modules/juce_audio_devices/native/juce_ALSA_linux.cpp:621:42: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘const juce::Thread::RealtimeOptions&’
  621 |         if (!startRealtimeThread ({2, 10})) {
      |                                          ^
In file included from /home/jesse/src/sonobus/deps/juce/modules/juce_core/juce_core.h:328,
                 from /home/jesse/src/sonobus/deps/juce/modules/juce_events/juce_events.h:52,
                 from /home/jesse/src/sonobus/deps/juce/modules/juce_audio_devices/juce_audio_devices.h:56,
                 from /home/jesse/src/sonobus/deps/juce/modules/juce_audio_devices/juce_audio_devices.cpp:46:

What is the expected behaviour?

Should compile without error on all supported compilers. The issue is resolved if you replace the line with the startRealtimeThread() call with:

   if (!startRealtimeThread (RealtimeOptions{}.withPriority(2).withProcessingTimeMs(10))) {

Operating systems

Linux

What versions of the operating systems?

Ubuntu 20.04 LTS with g++ 9.4.0

Architectures

x86_64

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct
commented

That's not how that line looks on master or develop: https://github.com/juce-framework/JUCE/blob/master/modules/juce_audio_devices/native/juce_ALSA_linux.cpp#L621

Please make sure you're really using the current develop branch.

Oops, I thought I did check that, but in fact it was only in my fork, I'm closing for ignoring. Sorry about that!