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

15386 commits

Author SHA1 Message Date
reuk
dcf0bf1c2a
WASAPI: Fix bug where attempting to clear output buffers had no effect 2025-06-03 16:12:00 +01:00
reuk
4045b0f8f6
WASAPI: Attempt to avoid potential races on state flags 2025-06-03 16:11:59 +01:00
reuk
86e0248f79
WASAPI: Use more early returns 2025-06-03 16:11:59 +01:00
reuk
b20df8d713
PopupMenu: Add missing target components for menus created by built-in widgets 2025-06-03 16:08:56 +01:00
reuk
336a475921
PluginListComponent: Pass associatedComponent for temporary AlertWindows
This should allow these alert windows to display at the correct scale on
HiDPI Windows machines.
2025-06-03 16:08:56 +01:00
reuk
fc32ca8641
AlertWindow: Store a SafePointer to the associatedComponent 2025-06-03 16:08:56 +01:00
reuk
6fb4d820a2
Projucer (MSVC): Avoid generating debug info when this info would be thrown away at link time 2025-06-03 16:08:56 +01:00
reuk
4ec935c709
Android: Refactor mouse handling to avoid repeated code 2025-06-03 16:08:56 +01:00
reuk
1741f6df29
Android: Update handling of ACTION_CANCEL to terminate all ongoing pointer events, instead of just the primary pointer 2025-06-03 16:08:56 +01:00
reuk
3c1012baeb
AudioDeviceManager: Handle loading of XML with missing fields more gracefully 2025-06-03 16:08:56 +01:00
reuk
f6df3e3ce1
CoreAudio: Respect buffer size passed to audio callback
We now query the incoming buffers to see how many samples are available.

If the callback's buffers will fit into our preallocated buffer (i.e. the
length in samples is smaller or equal to the preallocated buffer), then
we perform an audio callback with the provided data, even if the number
of samples is smaller than expected.

If the callback's buffers are larger than expected, we split the
incoming buffer into chunks that are no larger than the prepared
buffer-size.
2025-06-03 16:08:20 +01:00
reuk
ff99341179
CoreAudio: Replace HeapBlock with vector to retain allocation size 2025-06-03 16:08:20 +01:00
reuk
f904fd356a
Android: Improve screen safe-area reporting
The goal of this change is to ensure that the safeAreaInsets and
keyboardInsets members of Display correctly take the current system UI
and screen cutouts into account.

This change also enables rendering behind the status bar and navigation
bar for JUCE applications. This is in line with the new defaults in
Android 15, where building against the Android SDK 35 will automatically
enable "edge-to-edge" drawing. Enabling this behaviour on older
platforms too provides a more consistent experience.
2025-06-03 16:08:20 +01:00
reuk
cfc006aaf9
SidePanel: Add an option to restrict content to the safe screen area
A major benefit of this change is that the menu in the DemoRunner will
now display reasonably on mobile devices with notches or other
decorations.
2025-06-03 16:08:20 +01:00
reuk
f30d70049c
Projucer (Android): Avoid setting orientation key when unspecified by user 2025-06-03 16:08:20 +01:00
reuk
5e44c34377
Projucer (Android): Avoid restarting the activity on window config changes 2025-06-03 16:08:20 +01:00
reuk
cabb396c83
PIP: Respect screen safe areas for demo projects 2025-06-03 16:08:19 +01:00
Anthony Nicholls
34c32cbaf0 VST3: Add flag for ignoring parameter migration warning to the module header 2025-06-03 14:17:26 +01:00
Tom Poole
d6181bde38 JUCE version 8.0.8 2025-06-02 09:27:43 +01:00
reuk
cfa4be648d VST3: Silence clang-20 nontrivial-memcall warning 2025-06-02 09:27:10 +01:00
Tom Poole
f5530a5030 Resave all projects 2025-06-02 09:26:19 +01:00
Tom Poole
b0d569c74b Bump version number to 8.0.8 2025-06-02 09:24:54 +01:00
reuk
72e345cdd7
Direct2DImage: Add missing data change notification when creating writable BitmapData
The OpenGL renderer listens for imageDataChanged() to invalidated cached
textures.

Before this change, the SimpleFFTDemo would display a static (outdated)
image on Windows when using the OpenGLRenderer.
2025-05-27 18:01:53 +01:00
reuk
415aed4bea
Direct2DImage: Sync CPU storage when creating a BitmapData view over a subsection of the image
When syncing from CPU->GPU storage, we currently copy the entire image
contents. The contents of the CPU backup completely replace the old GPU
image. Therefore, if any pixels need to retain their existing values, we
need to read those pixels before overwriting them. This in turn implies
that, when a BitmapData refers to a subsection of the image, we should
always flush GPU->CPU storage first, so that the subsequent CPU->GPU
sync doesn't clobber pixels outside of the BitmapData region with
outdated values.

It's clear that copying the entire image back and forth could be
suboptimal when writing to image subsections, but to optimise this
process we'd have to keep track of dirty image regions or similar, which
may in turn pessimise more common cases.
2025-05-27 18:01:53 +01:00
reuk
4012677fdf
Direct2DImage: Mark CPU storage as outdated after modifying GPU storage by copying 2025-05-27 18:01:53 +01:00
reuk
457de394e0
iOS Audio: Remove buffer size assertion
This assertion is no longer relevant now that the AudioDeviceManager
enforces the maximum buffer size.
2025-05-27 14:39:27 +01:00
reuk
b4f71ab6db
AudioDeviceManager: Tidy up CallbackMaxSizeEnforcer 2025-05-27 14:39:25 +01:00
reuk
ee37564083
AudioDeviceManager: Move CallbackMaxSizeEnforcer from StandaloneFilterWindow 2025-05-27 14:39:25 +01:00
reuk
28a2700a28
AudioDeviceSelectorComponent: Tweak buffer size combo box to display the actual buffer size, even it it does not match any reported available buffer size 2025-05-27 14:38:56 +01:00
reuk
e92cac9ae0
VST3 Client: Clarify documentation for compatibility extensions 2025-05-22 11:15:46 +01:00
reuk
5d11fa5045
VST3 Client: Include VST2 ID in set of compatible classes when JUCE_VST3_CAN_REPLACE_VST2 is set
With this change in place:
- The compatible VST2 ID will be included in the list of compatible
  classes in the moduleinfo.json.
- getCompatibleParameterIds() will be called with the ID of the
  commpatible VST2 plugin.
2025-05-22 10:57:35 +01:00
reuk
dae152ee99
VST3 Client: Move parameter migration warning to ensure that relevant macros are defined when error state is checked 2025-05-21 17:48:11 +01:00
attila
a272b35261 TextEditor: Fix lines being invisible beyond the word wrap width 2025-05-21 17:47:20 +02:00
attila
0e4287df52 ShapedTextOptions: Rename maxWidth to wordWrapWidth
The old name didn't communicate it clearly enough what the parameter was
used for. This started to show when alignmentWidth was added.
2025-05-21 17:47:20 +02:00
Tom Poole
6ad121a408 CI: Remove always() condition 2025-05-21 11:00:25 +01:00
reuk
84eed04a59
Component: Add function to clear all cached image resources
In the DemoRunner, switching to and fro between the Settings tab and
the Demo tab displaying the OpenGL demo could lead to
GL_INVALID_OPERATION errors. This is because closing the demo shuts
down the GL context, destroying resources such as framebuffers. If any
Image objects backed by framebuffers outlive the context, they will be
invalidated. Component effect images are especially likely to hold onto
invalid framebuffer references.

With this change in place, images cached by Components will be
invalidated when the attached GL context goes out of scope, and will be
recreated when the new context is created.
2025-05-19 13:32:52 +01:00
reuk
bf54fb1fe9
Component: Recreate cached images if ideal type changes
This is intended to fix an issue where drawing a component snapshot into
a temporary OpenGL image can fail, because the GL context may not be
bound.
2025-05-19 13:32:52 +01:00
reuk
86732069c7
Image: Respect pixelStride when converting between image formats
Previously, this code assumed that a single channel image would always
have a pixel stride of 1. For image types where this assumption did not
hold, such as OpenGL, this function would produce incorrect results.
2025-05-19 13:32:52 +01:00
reuk
1fcdd29bf9
OpenGL: Return image BitmapData in JUCE order rather than native order
JUCE convention is that BitmapData holds the lines of the image ordered
from top to bottom, but OpenGL orders lines in the reverse direction.
By returning a negative line stride, we can iterate lines in the
expected order as long as we always increment the current pointer
position by the line stride after processing each line.
2025-05-19 13:32:52 +01:00
reuk
9f4aef4053
Image::BitmapData: Update getters to allow for negative lineStride 2025-05-19 13:30:27 +01:00
reuk
fb4159c436
OpenGL: Fix state restoration when drawing into a temporary nested context
Fixes a regression introduced in
bd26d79b17

The issue was observed in the DemoRunner when enabling the OpenGL
renderer and then switching to the LookAndFeel V1.

The cause of the problem was the creation of a secondary OpenGL-backed
Graphics instance in the DropShadowEffect. This temporary context could
modify the OpenGL context state without restoring the state
appropriately on destruction. As a result, when the outer long-lived
OpenGL context resumed drawing, properties such as the viewport, bound
shader, shader uniform values, and bound framebuffer could all be
incorrect.
2025-05-19 13:30:27 +01:00
reuk
00836d1e94
OpenGLFrameBuffer: Keep track of the previously-bound framebuffer 2025-05-19 13:30:27 +01:00
reuk
b15b65decf
DemoRunner: Avoid attempting to nest OpenGL contexts
OpenGL contexts normally can't be nested. Previously, when the main
renderer for the DemoRunner was set to OpenGL, we would forcibly reset
the engine to the software renderer when displaying any heavyweight
demo, including the OpenGL demos.

19061e6d introduced a regression, where the rendering engine was no
longer reset on Windows, so displaying an OpenGL demo while the global
renderer was also set to OpenGL would cause an assertion to fire in the
OpenGL Graphics context, after which rendering would fail.

With this change in place, we now fall back to the Direct2D renderer,
instead of the software renderer, when displaying a heavyweight demo.
2025-05-19 13:30:27 +01:00
reuk
2f0b287ce7
ContentSharer: Fix variable shadowing warnings in Android impl 2025-05-19 13:30:27 +01:00
reuk
63c6187fdf
AudioSampleBuffer: Fix a potential nullptr dereference flagged by clang-tidy 2025-05-19 13:30:27 +01:00
attila
7fc75c35f9
Android: Suppress availability macro warning 2025-05-19 13:30:27 +01:00
reuk
4bdb76158e
Projucer (Android): Update default toolchain versions
Soon, Google Play will require apps targeting API 35+ to be compatible
with 16 KB page sizes, which is achieved by updating the NDK version.
2025-05-19 11:33:23 +01:00
attila
94fc24e41a iOS: Fix compiling juce_audio_devices when juce_graphics isn't added 2025-05-16 18:08:54 +02:00
attila
74d4ebe8a0 Add LineSpacingDemo to show new GlyphArrangement option 2025-05-13 18:32:01 +02:00
attila
724221081b Change the value returned by Font::getAscentInPoints and getDescentInPoints
Prior to this commit the returned values were always normalised to the
value returned by getHeightInPoints().
I.e. getAscentInPoints() + getDescentInPoints() would always equal
getHeightInPoints(), even if ascent or descent overrides were in place.

With this change in place getAscentInPoints() + getDescentInPoints()
will always equal
getHeightInPoints() * (getAscentOverride() + getDescentOverride())

JUCE classes don't use this value for layout logic, so this commit
causes no visible changes in how JUCE draws text.
2025-05-13 18:32:01 +02:00