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

13029 commits

Author SHA1 Message Date
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
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
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
e86436297d
LV2 Client: Update param IDs to avoid writing malformed manifests 2022-06-07 12:41:53 +01:00
reuk
b41beb3767
LV2 Host: Properly map non-ASCII IRIs to URIDs 2022-06-06 21:20:40 +01:00
Tom Poole
8d1b91daee macOS: Use MTLStorageModeManaged for shared Metal textures 2022-06-01 14:01:43 +01:00
Tom Poole
cdd619e7a1 Xcode: Update LastUpgradeCheck 2022-06-01 13:57:33 +01:00
attila
dbfb74f091 Projucer: Remove ARA related no-op code 2022-05-25 14:18:11 +00:00
attila
f582c84c37 Remove VS2015 workarounds 2022-05-25 13:57:01 +02:00
attila
2fdc4f6633 Projucer: Remove VS2015 and CLion exporters 2022-05-25 13:56:55 +02:00
Tom Poole
92dda5a2d9 Remove the IAA demo project 2022-05-24 17:00:24 +01:00
Tom Poole
24e3340a55 Update all examples to use Visual Studio 2022 as the default Windows exporter 2022-05-23 20:20:44 +01:00
Tom Poole
c7cabbbaba VS2022: Work around a compiler bug 2022-05-23 20:20:44 +01:00
Tom Poole
8c48956681
Resave all projects 2022-05-23 13:18:08 +01:00
reuk
6e7a2c3225
AndroidDocument: Support file access to shared storage locations on Android 30+ 2022-05-23 13:18:08 +01:00
reuk
f7def289c5
Projucer: Request legacy file access when targeting older SDKs 2022-05-23 13:09:26 +01:00
reuk
7dd0cffe71
ConnectedChildProcess: Always cancel pending async updates before background thread stops 2022-05-23 13:09:26 +01:00
reuk
5b58f1c61e
FlacAudioFormat: Correctly balance preprocessor pragmas 2022-05-23 13:09:26 +01:00
reuk
9a12e93f5a
File: Add hasReadAccess() 2022-05-23 13:09:23 +01:00
attila
6f3fb5a29f Linux: Adjust natively reported border size by the current scale factor 2022-05-19 12:06:38 +02:00
attila
338c045719 DropShadower: Fix bug when setOwner() is called with a component without a parent
Until now when a Component without a parent was passed to setOwner() the
ParentVisibilityChangedListener would not install any hooks to any
components, hence it would not be notified, when the owner was added
to a parent.
2022-05-19 12:06:33 +02:00
attila
2c2c21ebc9 Linux: Fix sporadic positioning error after window creation 2022-05-19 12:06:28 +02:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
Tom Poole
05a42424f9 Windows: Consolidate graphics invalidation regions
Regions marked as dirty by repaint calls are now queued up and
dispatched when the corresponding physical display device is
refreshed
2022-05-16 16:37:31 +01:00
reuk
acefc92f88 TableListBox: Avoid calling virtual functions in constructor 2022-05-13 09:44:33 +01:00
attila
10d32c104d Resave all projects 2022-05-12 12:31:30 +02:00
attila
f4e33faea1 Add ARAPluginDemo PIP 2022-05-12 12:31:30 +02:00
attila
3c9d83b64a Projucer: Add support for ARA plugin PIPs 2022-05-12 12:31:30 +02:00