1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

11819 commits

Author SHA1 Message Date
ed
107a2cfe27 AudioProcessorPlayer: Support MIDI effect processors 2021-04-09 16:45:02 +01:00
reuk
9f03bbc358
VST3 Host: Ensure IEditController::setParamNormalized is only called from the message thread
Some plugins, such as the 'AGain' demo from the VST3 SDK and Diginoiz
Subdivine segfault when setParamNormalized is called from a background
thread.

This patch attempts to ensure that calls to get/set parameter values can
be made safely from the audio or message threads.

It also adds some MessageManagerLocks around some other calls to the
EditController's member functions which should technically only be made
from the GUI thread.

Finally, it updates the parameter input queues to the IAudioProcessor so
that writing to the queue is wait-free. As part of this change, a new
queue type is introduced which holds up to a single point. This should
improve memory usage for plugins with many parameters.
2021-04-09 12:19:22 +01:00
reuk
4cfe27af08
VST3 Host: Avoid using Array with a non-dummy CriticalSection 2021-04-09 12:19:22 +01:00
reuk
361f839546
VST3 Client: Avoid calling performEdit from the audio thread
Previously, all VST3 parameter changes were signalled to the host via
performEdit, regardless of the originating thread. This breaks the
contract of the IEditController interface, which requires that all calls
are made from the UI thread.

This change modifies the VST3 wrapper so that it will only call
performEdit when a parameter is set on the message thread. If a
parameter is set on the audio thread instead, then the parameter change
will be signalled to the host using
`ProcessData::outputParameterChanges`.

If your VST3 plugin uses a background thread to update parameters for
some reason, you'll encounter data races. Please don't do that.
2021-04-09 12:19:22 +01:00
reuk
c507ec9e73
VST3 Client: Ensure IComponentHandler::restartComponent is only called from the UI thread
When loading a JUCE plugin in Live, Live was producing diagnostic
messages in its Log.txt warning that restartComponent was being called
from a non-UI thread. This change should silence this warning, and
improve compliance with the VST3 spec.
2021-04-09 12:19:22 +01:00
reuk
1f21ce5f30
VST3: Add CachedParamValues helper type 2021-04-09 12:19:21 +01:00
reuk
e4659fd8f2
File: Use unit test random instance to generate unique filename 2021-04-09 10:26:28 +01:00
reuk
44441d3d79
VST2: Prefer unique_ptr to manual delete calls 2021-04-08 13:33:12 +01:00
reuk
dbf7806488
DSPModulePluginDemo: Disable resizing, as the plugin window fails to layout elegantly at other sizes 2021-04-08 13:33:12 +01:00
reuk
d50c3920ef
FirstOrderTPTFilter: Ensure state is updated properly when samplerate is changed 2021-04-08 13:33:11 +01:00
reuk
cfd85ad4ee
UnitTestRunner: Fix bug in File tests when multiple test instances are run simultaneously 2021-04-08 13:33:11 +01:00
ed
1a5fb5992a BufferingAudioReader: Added some tests 2021-04-08 11:51:42 +01:00
ed
c4a9c7876f BufferedAudioReader: Fixed a bug reading past the end of the input source 2021-04-08 11:51:42 +01:00
ed
b17ca5200a BufferingAudioReader: Don't pre-read chunks in constructor 2021-04-08 11:51:42 +01:00
ed
b3bdfdb34c BufferingAudioReader: Fixed an infinite read bug 2021-04-08 11:51:41 +01:00
ed
0aeee97b91 VST3: Reduced the scope of some MessageManagerLocks on Linux/BSD 2021-04-08 11:51:41 +01:00
ed
4e89580295 VST3 Host: Replaced per-plugin window RunLoop with a global shared RunLoop instance on Linux 2021-04-08 11:51:41 +01:00
ed
efd52398d1 VST3: Use shared MessageThread on Linux to run the message loop when host run loop interface isn't available 2021-04-08 11:51:41 +01:00
ed
33f37847bc VST: Use RAII initialisation for JUCE GUI and SharedResourcePointer for MessageThread 2021-04-08 11:51:41 +01:00
ed
ab90229583 VST: Pulled Linux SharedMessageThread out into its own file 2021-04-08 11:51:41 +01:00
ed
76d5c07c66 MessageManager: Only reinitialise platform-specific code on Windows when calling setCurrentThreadAsMessageThread() 2021-04-08 11:51:41 +01:00
ed
58761a44c1 Linux: Made X11Symbols singleton thread-safe 2021-04-08 11:51:41 +01:00
ed
be84627f93 Docs: Updated XmlElement docs to use getChildIterator() instead of deprecated macros 2021-04-08 11:51:41 +01:00
reuk
a10cc6faff
FileChooser: Improve MinGW compatibility 2021-04-07 16:24:39 +01:00
reuk
5753466bfb
UMP Tests: Add support for building with MinGW 2021-04-07 16:24:38 +01:00
reuk
98d5dc84e6
FileChooser: Get rid of unnecessary shared-ptr in win32 native implementation 2021-04-07 16:24:38 +01:00
reuk
b952d0204e
FileChooser: Pump message thread in destructor
IFileDialog::Show and CoUninitialize both seem to require the main
message loop to be active and running when they are called. If we block
the message thread while calling these functions, we may cause a
deadlock.

The destructor of the Win32NativeFileChooser was blocking the message
thread until the background thread exited, but the background thread was
unable to make progress while the message thread was blocked.

To work around this issue, we now pump the message thread in the
destructor of the Win32NativeFileChooser. If a dialog is currently
active, this should allow it to exit gracefully.

Note that we cannot use MessageManager::runDispatchLoopUntil here:
- MessageManager::runDispatchLoopUntil will not process any messages if
  the quit message has been received, which could lead to deadlocks if the
  FileChooser is destroyed after the quit message has been posted.
- This function isn't defined when JUCE_MODAL_LOOPS_PERMITTED is disabled.
2021-04-07 16:24:38 +01:00
reuk
9549f8c95e
AudioPluginHost: Try to find matching plugins by uniqueId if loading initially fails 2021-04-07 15:14:20 +01:00
reuk
041da08474
VST3: Add a new PluginDescription::uniqueId field 2021-04-07 15:14:20 +01:00
ed
a533e86044 TextEditor: Fixed a bug updating the text holder size for single-line editors 2021-04-07 14:12:11 +01:00
reuk
c7d082e770
CMake: Avoid commandline length limit when creating binarydata libraries with hundreds of input files 2021-04-07 10:22:36 +01:00
ed
282ad8fa9c Projucer: Fixed a bug escaping Xcode project settings starting or ending with quotes 2021-04-06 10:58:17 +01:00
ed
faf5ed4023 Linux/X11: Prefer CLIPBOARD selection to PRIMARY
As specified in https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt, CLIPBOARD should be used for explicit cut/copy/paste operations over PRIMARY
2021-04-06 09:31:52 +01:00
Tom Poole
df132fd6df VST: Fixed a compilation error on iOS when hosting VSTs 2021-04-01 11:36:45 +01:00
Tom Poole
60e13bec0c Allow use of an external VST3 SDK on BSD 2021-04-01 08:39:25 +01:00
ed
97ee7b7864 ADSR: Fixed a test failure with small sustain lengths 2021-03-31 17:21:42 +01:00
reuk
32690e6273
AudioProcessorPlayer: Resolve TSAN warnings 2021-03-31 12:10:51 +01:00
Tom Poole
765eafb1eb Fixed some file permissions 2021-03-31 10:12:59 +01:00
reuk
71fa211256
CMake: Add description of CMake source groups 2021-03-30 17:14:56 +01:00
reuk
429550f3dd
CMake: Support using custom VST3 SDKs 2021-03-30 17:04:53 +01:00
ed
af4b727b8a VST3: Fixed an assertion when JUCE_FORCE_LEGACY_PARAM_IDS=1 due to getProgramParameter() returning the wrong parameter 2021-03-29 17:02:00 +01:00
ed
52fbaa6042 Linux: Stop MidiInputThread before freeing handle in AlsaClient destructor
When immediately closing a MidiInput after starting, the ALSA handle may be closed whilst the MidiInputThread is running and it polls a destroyed handle
2021-03-29 15:41:16 +01:00
Tom Poole
79fbde7099 Added preliminary support for FreeBSD 2021-03-29 14:16:46 +01:00
reuk
241bb8d430
VST3 Host: Add cross-platform-compatible VST3 uid hash 2021-03-29 11:02:04 +01:00
ed
be0c36001d Linux: Fixed some comparison warnings using Clang 10 2021-03-29 10:52:16 +01:00
ed
d8004e2e2b Docs: Fixed a few switched "namespace juce" comments 2021-03-29 09:22:01 +01:00
ed
4b5a67f067 VST3: Fixed bypass and program parameter indices when JUCE_FORCE_USE_LEGACY_PARAM_IDS=1 and AudioProcessor::getBypassParameter() is implemented 2021-03-29 09:20:35 +01:00
ed
762cf327be macOS: Removed static display change callback 2021-03-29 09:20:16 +01:00
ed
675d93315f ADSR: Minor refactoring, added some tests 2021-03-29 09:20:05 +01:00
ed
9e64736519 Docs: Updated the documentation for Component::modifierKeysChanged() 2021-03-29 09:19:47 +01:00