1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-18 00:54:19 +00:00
Commit graph

1119 commits

Author SHA1 Message Date
reuk
31a7c62baf
Windows: Fix and suppress some analysis warnings
This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
2021-05-26 15:34:26 +01:00
ed
b9ae71ae8f AudioProcessorEditor: Fixed a bug introduced in 5a59c92b causing editors to always be marked as resizable by the host when using the default ComponentBoundsConstrainer 2021-05-26 09:21:13 +01:00
reuk
1124ec146d VSTPluginFormat: Fix rare crash where plugins may attempt to read uninitialised pointers 2021-05-14 16:55:02 +01:00
reuk
972c45a76e
VST3: Remove noisy warnings from VST3 SDK 2021-05-13 12:10:07 +01:00
reuk
900282ccf3
MinGW: Fix warnings and errors emitted when building VST3 plugins 2021-05-13 12:10:06 +01:00
reuk
52e6c4f727
VST3: Update VST3 SDK files 2021-05-13 12:10:06 +01:00
reuk
d31a1ee3ee
VST3 SDK: Revert JUCE modification to fplatform.h 2021-05-13 12:10:06 +01:00
reuk
47c7751750
VST3 Host: Avoid calling IMidiMapping functions on the audio thread 2021-05-12 11:14:35 +01:00
reuk
c8dae58fd2
VST3 Host: Avoid calling processBlock, prepareToPlay, and releaseResources simultaneously
The old design had us checking isActive inside our audio callbacks, and
also modifying isActive from prepareToPlay(), and releaseResources(). To
avoid race conditions, and to ensure that isActive actually reflects the
activation state of our plugin, we need to lock in these places. If we
don't lock, there's a chance that other threads will observe isActive to
be true while the plugin is not actually active (for example).

If you're not convinced, imagine this scenario:
- The message thread calls prepareToPlay. The plugin is activated.
- The audio thread starts calling processBlock, and gets as far as the
  isActive check. The plugin appears active, so we continue into
  processBlock.
- At the same time, the message thread calls releaseResources(). The
  processBlock call is still in progress, but the message thread is
  simultaneously making calls to setProcessing() and setActive(), which
  is a race.

Normally, it'd be up to the host of the AudioProcessor to ensure that
prepareToPlay() isn't called at the same time as processBlock().
However, VST3 plugins can request a restart at any time from the UI
thread, requiring us to call prepareToPlay() even while processBlock()
is running.
2021-05-12 11:14:34 +01:00
reuk
1df59f7469
VST3 Host: Only send updates for modified parameters 2021-05-07 10:10:53 +01:00
reuk
f35c2d90e2
VST3 Host: Ensure AudioProcessor parameter indices are used when appropriate
Previously, IEditController parameter indices were being used to index
into the AudioProcessor parameter array, but these parameter indices are
not guaranteed to point to the same parameter (parameter groups may
cause reordering on JUCE's side). Now, we use the IEditController
indices universally.
2021-05-06 16:04:22 +01:00
reuk
0f690662d8
AutoResizingNSViewComponent: Fix display issues for certain plugin views
Previously, the following plugins were causing issues when hosting their
editors:

- Softube plugins. I used Saturation Knob for testing, which crashed when
  deleting the temporary parent view.
- KORG Gadget series, which displayed a black screen after the temporary parent
  view was deleted.
- FabFilter Pro-C, which displayed at the wrong scale when opened on a
  retina display.
2021-05-06 15:51:09 +01:00
reuk
12df164127
Allow VST and LADSPA plugins to load properly from old PluginDescriptions
Old PluginDescriptions may only have the `deprecatedUid` field set, with
the `uniqueId` field set to 0. In this case, the uniqueId should be
ignored, and the deprecatedUid used instead.
2021-05-04 21:02:54 +01:00
reuk
15305e69af VST3 hosting: Fix issue where MIDI controller changes were not passed on to plugins 2021-05-02 14:59:12 +01:00
reuk
327fc86ff2
PluginDescription: Also check deprecatedUid when matching plugin identifier strings 2021-04-22 14:28:52 +01:00
reuk
36653e8b30
VST Host: Correctly retrieve results of effGetSpeakerArrangement
The plugin should interpret the arguments as VstSpeakerArrangement**
instances. It should modify the pointed-to VstSpeakerArrangement* so
that it points to a long-lived VstSpeakerArrangement in the plugin.
2021-04-22 12:47:46 +01:00
ed
3c48207d15 PluginHostType: Added Adobe Audition on macOS 2021-04-22 12:16:25 +01:00
ed
1ab54a9438 PluginHostType: Added AU Lab 2021-04-22 12:16:20 +01:00
reuk
75ed712b19 AU Wrapper: Fix build errors when using PreferredChannelConfigurations 2021-04-19 22:32:51 +01:00
reuk
8f74f3624c
AU Format: Enable output channels in MIDI FX
This mostly reverts commit 6e89e61b89.

MIDI FX plugins are allowed to have audio channels, even if they only
produce silence. If a plugin requests a particular bus/channel layout,
the host should respect this request, or attempt to update the layout.
The host should fill all channels that the plugin expects to be filled.

The old commit also meant that we weren't correctly supplying the host
sample rate to MIDI FX plugins.
2021-04-19 14:37:38 +01:00
reuk
cafb437762
AU Wrapper: Use correct sample rate for MIDI FX with no buses
MIDI FX AudioUnits can retrieve their current sample rate from an output
bus. However, it's reasonable for a JUCE MIDI FX plugin to require 0
output buses, in which case the correct sample rate cannot be retrieved.

This patch modifies the AU wrapper to ensure that MIDI FX plugins will
always have at least one output bus. This bus does not necessarily
correspond to a matching bus in the AudioProcessor, and it will not be
passed to AudioProcessor::processBlock. With the output bus in place,
the correct sample rate is reported in `prepareToPlay`.
2021-04-19 14:37:38 +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
1f21ce5f30
VST3: Add CachedParamValues helper type 2021-04-09 12:19:21 +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
reuk
041da08474
VST3: Add a new PluginDescription::uniqueId field 2021-04-07 15:14:20 +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
Tom Poole
765eafb1eb Fixed some file permissions 2021-03-31 10:12:59 +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
421b688eb6 VST3: Removed Windows HWNDComponentWithParent
This commit partially reverts the changes introduced in 455e08da as having an intermediate HWND and reparenting the plug-in window was causing issues when hosting certain plug-ins such as u-he's Diva and Arturia's Mini V3
2021-03-29 09:19:24 +01:00
Tom Poole
a9ad07a945 Use RAII for CFTypes 2021-03-25 15:48:35 +00:00
reuk
819736054f
GenericAudioProcessorEditor: Allow double-click on a slider to return to default value 2021-03-25 11:51:28 +00:00
reuk
6f92906107
AudioProcessor: Make wrapperType member const 2021-03-24 16:11:07 +00:00
reuk
d08b526930
AudioProcessor: Fix default behaviour of updateHostDisplay
This patch fixes an issue where calling `updateHostDisplay` with no
argument would have no effect.
2021-03-23 14:37:10 +00:00
Tom Poole
4c58e50f2e Bump version number to 6.0.8 2021-03-22 09:24:48 +00:00
ed
ad8f2013b5 AudioProcessorEditor: Set ComponentBoundsConstrainer stretchingTop/Left/Bottom/Right values when calling setBoundsForComponent() 2021-03-12 18:25:22 +00:00
reuk
3dc97ec71c
PluginHostType: Add missing juce:: namespace 2021-03-12 10:11:43 +00:00
ed
f2fffe6757 AU: Avoid a crash when calling setCurrentProgram() with an out-of-bounds index 2021-03-11 15:12:02 +00:00
reuk
c7feb75b97
PluginHostType: Use the name of the bridged hosting process to determine host
This patch also moves PluginHostType into juce_audio_processors in order
to allow hiding of function implementations.
2021-03-11 11:03:57 +00:00
reuk
9b80c7031e
VST3: Add support for 7.x.4 speaker arrangements 2021-03-10 16:14:42 +00:00
reuk
daf8761727 AU Host: Ensure discrete parameters are scaled correctly
Previously, the AU hosting code always computed the number of steps in
the parameter range as though the minimum parameter value was 0.

Now, we take the parameter's reported minimum into account when
computing the number of steps. We also use the parameter's range, rather
than its step number, when normalising/denormalising the parameter
value.
2021-03-09 17:26:28 +00:00
ed
5a59c92b20 AudioProcessorEditor: Allow editors to have a corner resizer without being resizable by the host and clarified the documentation regarding this and the editor's constrainer 2021-03-05 18:40:04 +00:00
ed
655a6e9367 VST: Use ComponentPeer::getAreaCoveredBy() to get scaled editor bounds on Windows and Linux 2021-03-05 18:40:04 +00:00
ed
7b68d5fa4b VST: Increased the scoped of a thread DPI awareness setter when creating plug-in editors on Windows 2021-03-05 18:40:03 +00:00
ed
f6338c0f8e Windows: Added ScopedThreadDPIAwarenessSetter for correctly setting and resetting thread DPI-awareness for methods which interact with an HWND and removed some DPI workarounds 2021-03-02 15:56:10 +00:00
reuk
a48a564f9e AU: Use slightly more readable channel type 2021-02-23 18:05:06 +00:00
ed
363481540b VST3: Use CharPointer_UTF8 when converting from Steinberg::char8 to juce::String 2021-02-19 19:07:13 +00:00