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

13090 commits

Author SHA1 Message Date
Tom Poole
2b16c1b94c JUCE version 7.0.0 2022-06-21 08:56:28 +01:00
Tom Poole
1a578f787c Resave all projects 2022-06-21 08:51:47 +01:00
Tom Poole
8b399998b4 Bump version number to 7.0.0 2022-06-21 08:38:55 +01:00
Tom Poole
37d6161da2 Merge the develop and master branches 2022-06-21 08:20:20 +01:00
reuk
cee1206fd1 StandardHeader: Include <utility> for GCC 12 compatibility 2022-06-21 08:19:50 +01:00
Tom Poole
784f82ffec
Fix some Doxygen issues 2022-06-16 16:19:10 +01:00
reuk
1b88df3c55
ExtensionsVisitor: Add missing defaulted special member functions 2022-06-16 16:19:10 +01:00
reuk
752c913cd2
AudioPlayHead: Move HostTimeNs out of AudioProcessor, to consolidate timing information 2022-06-16 16:19:09 +01:00
reuk
8fbd99c424
AudioPlayHead: Improve granularity of position info 2022-06-16 16:18:20 +01:00
reuk
891daf1332
Optional: Update implementation to improve debugging experience
This patch also makes Optional public to end users.
2022-06-16 16:17:53 +01:00
reuk
1b88362048
LV2 Host: Allow sending transport information to ports without "control" designation
The X42 stepseq.lv2 has an input atom port without the "control"
designation, but that still supports time:Position events. In order to
support this plugin, JUCE hosts will now send position info to any input
atom port that is marked as supporting this event type.

The host sync feature in stepseq.lv2 also requires the bar count to be
included in the position information.
2022-06-16 16:17:52 +01:00
reuk
b060d5d947
AudioPluginHost: Fix occasional deadlocks when scanning plugins out-of-process
Observed on Ubuntu Linux. Occasionally, the loop checking the
condition_variable in the plugin scanner would spin indefinitely.

The cause appears to be that handleMessageFromWorker could be
called immediately after sendMessageToWorker, but before locking the
mutex. If this happens, gotResponse will be false during every call to
condvar.wait_for, and the loop will never exit.

The rewritten version of the scanner always resets gotResult immediately
after the condvar is woken successfully, so a call to
handleMessageFromWorker or handleConnectionLost will always cause a
subsequent call to condvar.wait_for to exit successfully.

The Superprocess class has also been refactored and extracted to avoid
a circular dependency between Superprocess and CustomPluginScanner.
2022-06-16 16:17:52 +01:00
attila
2738ed6fa3 ARA Host: Add missing documentation 2022-06-16 14:41:41 +02:00
Tom Poole
83176e23ca Add a version ID macro 2022-06-16 11:16:33 +01:00
reuk
964a1aa870
VST3 Client: Allow host to enable/disable buses at will
Previously, activateBus would fail if the new BusesLayout wasn't
supported, as reported by isBusesLayoutSupported. However, according to
the VST3 docs, a host is allowed to enable and disable buses in any
combination, and the plugin should be able to handle this gracefully.

The ability to enable/disable individual buses without failure is
particularly important because there's no VST3 API to set a complete bus
layout in one go. That is, the only way to set all buses active or all
buses inactive is to set the appropriate state on each bus individually,
which in turn means that at some point, some buses will be active and
some will be inactive. Disallowing such 'intermediate' states may
prevent the host from putting the plugin into other (valid) states.

To ensure that the VST3 wrapper always accepts activateBus calls, it now
keeps track of the activation state of each bus as requested by the
host. When the host tries to change the activation state, the wrapper
will try to set the host's "ideal" bus layout on the AudioProcessor. If
this fails, the AudioProcessor will retain its previous bus layout.

The buffer remapping inside the process callback has been made more
robust, to handle cases where the host and the AudioProcessor disagree
about the activation state of each bus:

For input buses:
- If the host has activated the bus, but the AudioProcessor decided to
  keep the bus inactive, the host's input will be ignored.
- If the host deactivated the bus, but the AudioProcessor wanted to keep
  the bus active, the AudioProcessor will be provided with silence on
  that bus.

For output buses:
- If the host has activated the bus, but the AudioProcessor decided to
  keep the bus inactive, the wrapper will clear the host's output
  bus buffers.
- If the host deactivated the bus, but the AudioProcessor wanted to keep
  the bus active, the AudioProcessor's output on that bus will be
  ignored.

The AudioBuffer passed to the wrapped AudioProcessor will no longer
contain any pointers from the host's ProcessData. Instead, the host's
inputs will be copied (in JUCE channel order) to a temporary buffer,
and this temporary buffer will be passed to
AudioProcessor::processBlock. After processBlock, the buffer contents
will be copied to the host's output buffers.

This change is intended to avoid a potential issue when reordering
channels into JUCE order, which may necessitate copying a host input
channel to a different host output channel. In the case that the host is
using the same buffers for both inputs and outputs, copying an input to
an output channel may end up overwriting another input channel, breaking
the plugin's inputs.
2022-06-13 15:29:58 +01:00
reuk
a5b55ab902
VST(3) Host: Use standard (non-flipped) coordinate space for plugin editors
This change fixes an issue where UAD VST2 plugins would incorrectly draw
a menu at the top, rather than at the bottom, of the editor view.
2022-06-13 15:29:57 +01:00
reuk
2b82ce7c84
DemoRunner: Avoid exposing unnecessary accessible component 2022-06-13 15:29:57 +01:00
reuk
53484db875
Accessibility: Avoid allowing TextEditor and Viewport internal components to be accessibility-focused
The TextHolderComponent and Viewport::componentHolder don't have any
accessible semantics, so they shouldn't be included in the accessible
component hierarchy.
2022-06-13 15:29:57 +01:00
reuk
edddca5ac3
VST3 Host: Fix UB in VST3Parameter implementation 2022-06-13 15:29:57 +01:00
reuk
1c10e0c79b
Android: Fix problems with accessible text navigation
Previously, when navigating in a text editor by words, the cursor would
get 'stuck' after moving a single word. This issue should now be
resolved.

Additionally, the cursor position was not updated properly when
adjusting a selection, and would instead be moved to the end of the
selected range. With this patch applied, the cursor should now be set to
the correct position when modifying selections. When extending a
selection backwards, the cursor will display at the beginning of the
selected range, rather than the end.

Finally, most Android apps announce the 'skipped' characters or words
whenever the cursor is moved, but this feature was broken in JUCE. This
patch enables this feature.
2022-06-13 15:29:57 +01:00
reuk
b80f77f8b1
Android: Allow TalkBack borders to be displayed on OpenGL views 2022-06-13 15:29:57 +01:00
reuk
93a815ec8d
DemoRunner: Add AccessibilityDemo to iOS and Android builds 2022-06-13 15:29:57 +01:00
reuk
2b1745272e
Android: Fix a couple of accessibility-related crashes
These crashes could be seen in the DemoRunner when selecting items in
nested PopupMenu windows.
2022-06-13 15:29:56 +01:00
reuk
61b26e4e35
VST3 Client: Handle null channels provided by host 2022-06-13 15:29:56 +01:00
reuk
560e75da27
MultiOutSynthPlugin: Avoid assertions in VST3PluginTestHost 2022-06-13 15:29:55 +01:00
reuk
0e85fec4a2
VST3 Client: Allow host to enable/disable buses at will
Previously, activateBus would fail if the new BusesLayout wasn't
supported, as reported by isBusesLayoutSupported. However, according to
the VST3 docs, a host is allowed to enable and disable buses in any
combination, and the plugin should be able to handle this gracefully.

The ability to enable/disable individual buses without failure is
particularly important because there's no VST3 API to set a complete bus
layout in one go. That is, the only way to set all buses active or all
buses inactive is to set the appropriate state on each bus individually,
which in turn means that at some point, some buses will be active and
some will be inactive. Disallowing such 'intermediate' states may
prevent the host from putting the plugin into other (valid) states.

To ensure that the VST3 wrapper always accepts activateBus calls, it now
keeps track of the activation state of each bus as requested by the
host. When the host tries to change the activation state, the wrapper
will try to set the host's "ideal" bus layout on the AudioProcessor. If
this fails, the AudioProcessor will retain its previous bus layout.

The buffer remapping inside the process callback has been made more
robust, to handle cases where the host and the AudioProcessor disagree
about the activation state of each bus:

For input buses:
- If the host has activated the bus, but the AudioProcessor decided to
  keep the bus inactive, the host's input will be ignored.
- If the host deactivated the bus, but the AudioProcessor wanted to keep
  the bus active, the AudioProcessor will be provided with silence on
  that bus.

For output buses:
- If the host has activated the bus, but the AudioProcessor decided to
  keep the bus inactive, the wrapper will clear the host's output
  bus buffers.
- If the host deactivated the bus, but the AudioProcessor wanted to keep
  the bus active, the AudioProcessor's output on that bus will be
  ignored.

The AudioBuffer passed to the wrapped AudioProcessor will no longer
contain any pointers from the host's ProcessData. Instead, the host's
inputs will be copied (in JUCE channel order) to a temporary buffer,
and this temporary buffer will be passed to
AudioProcessor::processBlock. After processBlock, the buffer contents
will be copied to the host's output buffers.

This change is intended to avoid a potential issue when reordering
channels into JUCE order, which may necessitate copying a host input
channel to a different host output channel. In the case that the host is
using the same buffers for both inputs and outputs, copying an input to
an output channel may end up overwriting another input channel, breaking
the plugin's inputs.
2022-06-13 11:36:52 +01:00
reuk
a868952c36
VST(3) Host: Use standard (non-flipped) coordinate space for plugin editors
This change fixes an issue where UAD VST2 plugins would incorrectly draw
a menu at the top, rather than at the bottom, of the editor view.
2022-06-13 11:36:52 +01:00
reuk
0a6000d0e7
DemoRunner: Avoid exposing unnecessary accessible component 2022-06-13 11:36:52 +01:00
reuk
c9950e3801
Accessibility: Avoid allowing TextEditor and Viewport internal components to be accessibility-focused
The TextHolderComponent and Viewport::componentHolder don't have any
accessible semantics, so they shouldn't be included in the accessible
component hierarchy.
2022-06-13 11:36:52 +01:00
reuk
1d1eda5dd2
VST3 Host: Fix UB in VST3Parameter implementation 2022-06-13 11:36:51 +01:00
reuk
d4d9740037
Android: Fix problems with accessible text navigation
Previously, when navigating in a text editor by words, the cursor would
get 'stuck' after moving a single word. This issue should now be
resolved.

Additionally, the cursor position was not updated properly when
adjusting a selection, and would instead be moved to the end of the
selected range. With this patch applied, the cursor should now be set to
the correct position when modifying selections. When extending a
selection backwards, the cursor will display at the beginning of the
selected range, rather than the end.

Finally, most Android apps announce the 'skipped' characters or words
whenever the cursor is moved, but this feature was broken in JUCE. This
patch enables this feature.
2022-06-13 11:36:51 +01:00
reuk
83dca0f1e5
Android: Allow TalkBack borders to be displayed on OpenGL views 2022-06-13 11:36:51 +01:00
reuk
d83c30efa1
DemoRunner: Add AccessibilityDemo to iOS and Android builds 2022-06-13 11:36:51 +01:00
reuk
9c9d930760
Android: Fix a couple of accessibility-related crashes
These crashes could be seen in the DemoRunner when selecting items in
nested PopupMenu windows.
2022-06-13 11:36:51 +01:00
reuk
54d7f5efb0
VST3 Client: Handle null channels provided by host 2022-06-13 11:36:51 +01:00
reuk
5c40697994
MultiOutSynthPlugin: Avoid assertions in VST3PluginTestHost 2022-06-13 11:36:50 +01:00
attila
5d5610286f Component: Use the rounded integer mouse position when evaluating hitTest
This commit reverts a small part of
4ca923a34b.
2022-06-10 20:38:37 +02:00
attila
032cc528c8 DragAndDropContainer: Fix the escape key dismissing the drag operation 2022-06-10 20:38:37 +02:00
attila
edf68d209c MacOS: Override and implement JuceNSViewClass::updateTrackingAreas()
This change fixes a bug where a fullscreen window would not receive
mouseMoved events until the cursor left and then reentered the
window's area.
2022-06-10 20:38:37 +02:00
attila
751d85f8c7 Component: Use the rounded integer mouse position when evaluating hitTest
This commit reverts a small part of
4ca923a34b.
2022-06-10 19:16:37 +02:00
attila
74af7b11ec DragAndDropContainer: Fix the escape key dismissing the drag operation 2022-06-10 19:16:37 +02:00
attila
c1a38b0cfc MacOS: Override and implement JuceNSViewClass::updateTrackingAreas()
This change fixes a bug where a fullscreen window would not receive
mouseMoved events until the cursor left and then reentered the
window's area.
2022-06-10 19:16:37 +02:00
attila
94dcad52d0 Slider: Add keyboard control even without accessibility 2022-06-10 18:19:49 +02:00
reuk
cce38de6cf
Windows: Fix virtual keyboard hide/show on Windows 11
This change fixes an issue where the touch keyboard failed to show when
selecting a TextEditor.

On the current versions of Windows 10 and 11, the undocumented
ITipInvocation workaround no longer seems to be required, so it has been
removed.

The isTabletModeActivatedForWindow function is no longer needed, and has
been removed. This function also appears to return inconsistent results:
the window may be in 'desktop mode', but devices with touchscreens
should still display the keyboard when selecting a TextEditor by touch.
2022-06-09 16:55:19 +01:00
reuk
140f8fedb1
TextEditor: Add option to dismiss the virtual keyboard on touches outside
Previously, individual components had to ask the peer to hide and show
the keyboard, by calling textInputRequired() and
dismissPendingTextInput() respectively. When an onscreen keyboard (OSK)
was required, most Peer implementation would directly hide/show the OSK
inside these function. However, the iOS ComponentPeer implementation
instead listened to the application's global keyboard focus, and only
opened the OSK when the focused component was also a TextInputTarget
with active input.

The iOS scheme seems like a better design, as it enforces that the OSK
hiding and showing is synced with the keyboard focus of the application.
In the other implementations, it was possible for a Component to call
textInputRequired even when it didn't have the keyboard focus, putting
the application into an inconsistent state. The iOS scheme also makes
the TextInputTarget interface more useful, as it enforces that the OSK
will only display for components that implement TextInputTarget, and
return true from isTextInputActive().

This patch changes all Peer implementations to match the iOS
implementation, improving consistency. Each time the global keyboard
focus changes, refreshTextInputTarget is called automatically, and the
OSK is shown if the focused component is a TextInputTarget that returns
true from isTextInputActive, and hidden otherwise. Components can also
call refreshTextInputTarget manually. This should be done whenever the
component updates the return value of isTextInputActive(). Effectively,
the Peer is now responsible for keeping track of the focused
TextInputTarget, rather than allowing individual components to hide and
show the OSK at will.

Additionally, this patch adds an option to the TextEditor to
automatically dismiss the OSK when the mouse is clicked outside of the
editor. This should improve user experience on mobile platforms, where
touches on sibling components may cause a TextEditor to gain keyboard
focus and unnecessarily display the OSK.
2022-06-09 16:55:19 +01:00
reuk
86a36b8b52
Android: Improve complexity of ActivityLifecycleCallbacks::invoke 2022-06-09 16:55:18 +01:00
reuk
1560242906
Android: Add missing ActivityLifecycleCallbacks method 2022-06-09 16:55:18 +01:00
reuk
6375f640db
InAppPurchases: Add support for Android BillingClient 5.0.0 2022-06-09 16:55:17 +01:00
attila
7c66dc8e15 Slider: Add keyboard control even without accessibility 2022-06-09 16:24:00 +02:00
reuk
a91694108c Windows: Fix virtual keyboard hide/show on Windows 11
This change fixes an issue where the touch keyboard failed to show when
selecting a TextEditor.

On the current versions of Windows 10 and 11, the undocumented
ITipInvocation workaround no longer seems to be required, so it has been
removed.

The isTabletModeActivatedForWindow function is no longer needed, and has
been removed. This function also appears to return inconsistent results:
the window may be in 'desktop mode', but devices with touchscreens
should still display the keyboard when selecting a TextEditor by touch.
2022-06-08 19:51:11 +01:00