bespokesynth: Fix compatibility with pipewire's JACK emulation

+36
+30
pkgs/by-name/be/bespokesynth/2001-bespokesynth-fix-pipewire-jack.patch
···
··· 1 + diff --git a/libs/JUCE/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp b/libs/JUCE/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp 2 + index 4cce7016f..25554a7cd 100644 3 + --- a/libs/JUCE/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp 4 + +++ b/libs/JUCE/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp 5 + @@ -291,7 +291,6 @@ public: 6 + juce::jack_on_info_shutdown (client, infoShutdownCallback, this); 7 + juce::jack_set_xrun_callback (client, xrunCallback, this); 8 + juce::jack_activate (client); 9 + - deviceIsOpen = true; 10 + 11 + if (! inputChannels.isZero()) 12 + { 13 + @@ -336,6 +335,7 @@ public: 14 + } 15 + 16 + updateActivePorts(); 17 + + deviceIsOpen = true; 18 + 19 + return lastError; 20 + } 21 + @@ -525,7 +525,8 @@ private: 22 + static void portConnectCallback (jack_port_id_t, jack_port_id_t, int, void* arg) 23 + { 24 + if (JackAudioIODevice* device = static_cast<JackAudioIODevice*> (arg)) 25 + - device->mainThreadDispatcher.updateActivePorts(); 26 + + if (device->isOpen()) 27 + + device->mainThreadDispatcher.updateActivePorts(); 28 + } 29 + 30 + static void threadInitCallback (void* /* callbackArgument */)
+6
pkgs/by-name/be/bespokesynth/package.nix
··· 66 fetchSubmodules = true; 67 }; 68 69 # Linux builds are sandboxed properly, this always returns "localhost" there. 70 # Darwin builds doesn't have the same amount of sandboxing by default, and the builder's hostname is returned. 71 # In case this ever gets embedded into VersionInfoBld.cpp, hardcode it to the Linux value
··· 66 fetchSubmodules = true; 67 }; 68 69 + patches = [ 70 + # Fix compatibility with pipewire's JACK emulation 71 + # https://github.com/BespokeSynth/BespokeSynth/issues/1405#issuecomment-1721437868 72 + ./2001-bespokesynth-fix-pipewire-jack.patch 73 + ]; 74 + 75 # Linux builds are sandboxed properly, this always returns "localhost" there. 76 # Darwin builds doesn't have the same amount of sandboxing by default, and the builder's hostname is returned. 77 # In case this ever gets embedded into VersionInfoBld.cpp, hardcode it to the Linux value