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

15168 commits

Author SHA1 Message Date
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
attila
283ea12958 Fix addFittedText overflowing the bounds when line spacing and height multiple is non-default 2025-05-13 18:32:01 +02:00
attila
b9458fb240 GlyphArrangementOptions: Add missing JUCE_API annotation 2025-05-13 18:32:01 +02:00
attila
a0e429fdd0 Fix bidi ordering 2025-05-12 16:49:05 +02:00
attila
69b2b3ff5d Remove unused internal bidi features
This commit removes the possibility to construct BidiParagraph and
BidiLine objects with non-zero offsets. We don't use these features,
and the assumption that these offsets are always zero simplifies our
visual ordering algorithm.
2025-05-12 16:49:05 +02:00
attila
8a27eb3b7c Tidying 2025-05-12 16:49:05 +02:00
attila
10b6289295 SimpleShapedText: Fix overallocating s32 buffer
Prior to this commit we overallocated the s32 buffer. The buffer was
unnecessarily padded by zeros, and the line stating this, wasn't
actually dropping the null terminator.
2025-05-12 16:49:05 +02:00
Anthony Nicholls
bc4ea1a66f HighResolutionTimer: Prevent a race condition in the unit tests
Some checks failed
JUCE Private Push Trigger / JUCE Push Trigger (push) Has been cancelled
2025-05-09 16:44:01 +01:00
Mathieu Demange
980926d4a6 Reword isSingularity() brief to avoid Doxygen line break
The last period in "i.e." was previously interpreted as the end of a brief description.
2025-05-09 12:57:02 +01:00
attila
c61158ed3a Add GlyphArrangementOptions for addFittedText and drawFittedText
The new options can be used to affect line spacing.
2025-05-09 13:39:11 +02:00
attila
787f7a4694 Use ShapedTextOptions::withAdditiveLineSpacing where appropriate
After reviewing the NSAttributedString API it seems justified to have
two different functions for additive and multiplicative line spacing
settings. For NSAttributedString they are setLineSpacing and
setLineHeightMultiple.

Using this function, when appropriate, exercises it lessening the
likelihood of code rot.
2025-05-09 13:39:11 +02:00
Sudara
f908e52bdf Docs: Align FloatVectorOperations comments with parameter names
Some checks failed
JUCE Private Push Trigger / JUCE Push Trigger (push) Has been cancelled
2025-05-08 16:33:24 +02:00
Sudara
9a4ab937ad Docs: Fix a few tiny typos in comments 2025-05-08 16:33:24 +02:00
reuk
626a4ea475
VST2 Client: Fix issue where compatible VST3 IDs were misreported
`convertVST2PluginId` returns `array<byte, 16>` rather than `String`, so
it's incorrect to interpret the result as a hex string.
2025-05-06 16:11:20 +01:00
reuk
e42ab22a78
VST3 Client: Add null checks, in case Edit Controller is used before being connected 2025-05-06 16:11:20 +01:00
Anthony Nicholls
76215d2dd0 ListenerList: Prevent false positive assertions in callCheckedExcluding 2025-05-01 15:57:19 +01:00
Oli
6972c4f0e3 Direct2D: Fix ETW tracing build errors
This makes Direct2DMetrics and current frameId accessible to implementation subclasses.

It also replaces JUCE_WRITE_TRACE_LOG with JUCE_WRITE_TRACE_LOG_VA as intended in original implementation.

Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-30 10:50:52 +01:00
Oli
3ff8d4f640 DSP: Enable SIMD on ARM only when NEON is available 2025-04-28 15:50:22 +01:00
Oli
522217d9c5 Projucer (MSVC): Fix multi-arch PCH project generation
Co-authored-by: Ryaan Ahmed <ryaan.ahmed@bandlab.com>
2025-04-24 14:57:30 +01:00