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

14795 commits

Author SHA1 Message Date
reuk
3506d66fae
iOS Audio: Always deactivate device before setting new preferred samplerate
This fixes a bug on iOS 17 running on a 9th gen iPad.

- Set JUCE_IOS_AUDIO_EXPLICIT_SAMPLERATES=44100,48000,88200,96000
- Start the DemoRunner.
- Add a breakpoint in AudioDeviceManager::audioDeviceAboutToStartInt().
- In the DemoRunner, change the sample rate to 96000.
- The breakpoint will fire. Observe the value of
  getCurrentBufferSizeSamples().
- Move the breakpoint to audioDeviceIOCallbackInt and continue
  execution.
- The breakpoint will fire. Observe the value of the numSamples
  parameter.

numSamples should always be no larger than the sample count reported in
audioDeviceAboutToStartInt().

Before this change, it was possible for getCurrentBufferSizeSamples() to
return a value smaller than the buffer size of subsequent process
callbacks.

Removing the availability checks and unconditionally
deactivating/reactivating the device seems to fix this issue, and the
correct buffer size is returned immediately when the device is
(re)started.
2024-10-28 11:12:47 +00:00
reuk
1189687611
AAX Client: Add support for AAX_EPlugInCategory_MIDIEffect, added in AAX SDK 2.6.1
This change also bumps the minimum supported AAX SDK to 2.6.1
2024-10-28 11:12:47 +00:00
reuk
d54febd8f5
Projucer: Automatically set AAX_EPluginCategory_MIDIEffect when JUCE_MIDI_EFFECT is enabled 2024-10-28 11:12:47 +00:00
reuk
d9fe2f0e77
CMake: Automatically set AAX_EPluginCategory_MIDIEffect when JUCE_MIDI_EFFECT is enabled 2024-10-27 16:16:26 +00:00
無常
d9ed81b4f0
WindowsDLL: Add missing JUCE_API attributes 2024-10-27 16:16:26 +00:00
attila
ed80adb3c7 CMake: Windows: Fix architecture detection for projects using add_subdirectory(JUCE... 2024-10-25 15:51:36 +02:00
attila
2d6bb5ba0e Linux: CMake: Omit linking browser related dynamic libraries
We've already had a mechanism in place which loads these libraries, such
as libwebkit2gtk-4.1.so, only if they are available on the system during
runtime. This way we can run with either version 4.1 or 4.0 of the
library depending on which one is available.

It's also possible to run apps on headless systems with the relevant
features being effectively disabled in such situations.
2024-10-25 15:51:22 +02:00
attila
11403080ba VBlankAnimatorUpdater: Use the timestamp provided by VBlankAttachment 2024-10-25 15:45:56 +02:00
attila
425f1858b5 VBlankAttachment: Add new constructor with a callback that receives a timestamp 2024-10-25 15:45:56 +02:00
attila
d9a3efd3cb ComponentPeer::VBlankListener: Add timestamp parameter to the vblank callback 2024-10-25 15:44:34 +02:00
reuk
4bc2952419
OpenGL: Set up context sharing on the GL thread, rather than the main thread
wglShareLists will only succeed when the shared context is not currently
active on another thread, but it is difficult to ensure that the GL
thread is paused/inactive at any given time - in particular, it's very
easy to accidentally introduce deadlocks where the main thread waits for
the render thread's lock while the render thread waits for the
messagemanager lock.

The simplest way to ensure that no other thread has activated the shared
context is to share the contexts directly on the render thread itself.
2024-10-24 20:43:10 +01:00
reuk
10680f9bf7
OpenGL: Detach OpenGL context after initialisation 2024-10-24 20:43:10 +01:00
reuk
e2e3d949c7
OpenGL: Use C++ thread_local instead of JUCE ThreadLocal 2024-10-24 20:43:10 +01:00
reuk
fcaf5adb25
OpenGL: Avoid displaying OpenGL window until a frame has been drawn
This avoids an issue where, when attaching an OpenGLContext as a child
of a window rendered with Direct2D, the area covered by the OpenGL
renderer would display as a white rectangle until the context had
drawn a frame. This only affected the Direct2D renderer; when the parent
window used the software renderer, no white rectangle was shown.
2024-10-24 20:43:09 +01:00
無常
a784d5776b TextLayout: Fix getStringBounds of empty strings 2024-10-24 19:40:42 +01:00
attila
3c38adcc03 ResizableWindow: Remove assertion
The assertion can routinely fire on Linux, where a window may go through
many size changes from (0, 0) to its actual size due to the nature of
how XWindow reports these in subsequent ConfigureNotify events.

These subsequent changes aren't visibly observable by users.
2024-10-24 13:10:14 +02:00
attila
3118ee1e5c Linux: Prevent stale ConfigureNotify events from overwriting the current window position 2024-10-24 13:10:14 +02:00
reuk
efb0daf2e9
Standalone: Fix typo in standalone wrapper 2024-10-23 12:32:24 +01:00
Tom Poole
9e193862c1 CMake: Improve Windows Arm architecture detection 2024-10-23 10:59:05 +01:00
reuk
cba00cc71f Projucer: Always enable generated manifests for VS exporters 2024-10-22 15:51:39 +01:00
reuk
7a363377e0 WindowsDLL: Fix project type
The type was incorrectly changed to "static library".
2024-10-22 14:11:13 +01:00
reuk
90f37e27ea Windows: Fix DLL build
There were a few "ambiguous operator new/delete" errors that were due to
inheriting from a private base class that used the leak detector. These
errors are resolved by adding the leak detector to the derived classes.

JUCE_API was missing from a few useful types, notably the ARA hosting
types.
2024-10-22 13:24:46 +01:00
reuk
6f20de5434
iOS Audio: Reset sample rate to default after querying available rates 2024-10-21 22:36:31 +01:00
reuk
aca71ca788
Projucer: Use WRAPPER_NAME instead of FULL_PRODUCT_NAME in Xcode post-build scripts
WRAPPER_NAME is documented in the build settings reference, whereas
FULL_PRODUCT_NAME is not.
2024-10-21 22:36:31 +01:00
reuk
c6110c09b5 Timer: Warn if the TimerThread outlives the ScopedJuceIniitaliser_GUI 2024-10-21 21:54:30 +01:00
reuk
ee641f7baf VST2 Client: Avoid data race on appDelegate pointer
Previously, it was possible for the Timer destructor to run after the
last ScopeJuceInitialiser_GUI destructor, which meant that timer
callbacks could continue to be fired (via the appDelegate pointer) after
the static appDelegate instance had been destroyed.

With this change in place, we now ensure the Timer is destroyed before
the ScopedJuceInitialiser_GUI.
2024-10-21 21:54:30 +01:00
attila
82080f9372 ShapedText: Apply the horizontal scaling to the extra kerning
This fixes an undesired behaviour where squashing the text using
GlyphArrangement::addFittedText would only squash the visible glyphs but
not the additional kerning space between them.
2024-10-21 15:34:42 +02:00
attila
8693507ead ShapedText: Apply extra kerning only before clusters
This avoids inserting tracking between glyphs in a single cluster e.g. a
base glyph and diacritic marks.
2024-10-21 15:34:42 +02:00
attila
503788fd0c ShapedText: Fix falsely marking glyphs with missing extent information as whitespace 2024-10-21 15:34:42 +02:00
attila
bd14d47211 SimpleShapedText: Restore and tidy up earlier line breaking logic
This commit isn't fixing any known bugs, but restores the soft break
iteration logic to its state prior to
5e4016b4fb, which accidentally changed it.
2024-10-21 15:34:42 +02:00
attila
b545b79cb3 GlyphArrangement: Make drawFittedText squashing behaviour more similar to JUCE 7
This commit fixes a regression added during the ShapedText based rewrite
of the class. The minimumHorizontalScale parameter was mistakenly
interpreted as an absolute scale, whereas its meaning in the old
implementation was a relative scalar applied to the Font's horizontal
scale.
2024-10-21 15:34:42 +02:00
Oliver James
60c1deb4e4 DSP: Simplify processor definitions and add Windows Arm support 2024-10-21 14:11:11 +01:00
Oliver James
c68e82f44d Core: Handle Windows Arm platform definition 2024-10-21 14:11:11 +01:00
reuk
1f71b5f4fb
AudioProcessor: Update documentation to make implementation requirements clearer for MIDI-related member functions 2024-10-21 12:28:56 +01:00
reuk
4a87eb3c40
AAX Client: Query processor instead of relying on JucePlugin_IsMidiEffect 2024-10-21 12:28:56 +01:00
reuk
499abb7637
VST Client: Query processor instead of relying on JucePlugin_IsMidiEffect 2024-10-21 12:28:56 +01:00
reuk
64823f2d37
LV2 Client: Query processor instead of relying on JucePlugin_IsMidiEffect 2024-10-21 12:28:55 +01:00
reuk
436100c94b
AU Client: Replace use of JucePlugin_IsMidiEffect with AUMainType
An audio unit with main type aumi should always have a MIDI input and
output, regardless of how IsMidiEffect is set.
2024-10-21 12:28:55 +01:00
reuk
103ac55b92
AU Client: Refactor scopeToDirection 2024-10-21 12:28:55 +01:00
reuk
1f56562652
StandaloneFilterWindow: Allow plugin to run when no display is present
This is useful on headless Linux systems. When no display is attached,
window creation is bypassed but a StandalonePluginHolder is still
created, allowing audio to be processed.
2024-10-21 12:28:55 +01:00
reuk
420922253f
StandaloneFilterWindow: Avoid null pointer dereference when displays array is empty 2024-10-21 12:28:55 +01:00
reuk
88e544a085
Javascript: Refactor interrupt handler 2024-10-21 12:28:55 +01:00
reuk
3cca812d38
Javascript: Fix bug where timeout previously applied in call to execute() would be applied in subsequent calls to callFunction() 2024-10-21 12:28:55 +01:00
reuk
8ccea668e4
PopupMenu: Adjust mouse interactions so that menu is only dismissed on mouseUp if the mouse has moved
Previously, MouseSourceState::checkButtonState would trigger a menu item
if the MouseSourceState had observed the mouse button transition from
pressed to released while over an item, after more than 250ms had
elapsed since creating the menu window. In situations where the main
thread was very busy, this timeout could sometimes be reached inside the
same mouse click/release gesture. If the menu was created inside a
mouse-down, then simply tapping the mouse could sometimes trigger an
item from the menu as soon as the menu window appeared.

To help avoid accidentally triggering menu items, the menu window now
prevents any item from being triggered by the mouse until either the
mouse has been released once, or the mouse has moved. Put another way,
if the mouse is initially pressed when the menu is shown, it cannot
trigger a menu item unless the mouse is moved before it is released.
2024-10-20 22:59:40 +01:00
reuk
db4a2c0b9f
PopupMenu: Make dismissOnMouseUp private 2024-10-20 22:59:40 +01:00
reuk
570b86ff0c
PopupMenu: Refactor mouseOver detection
The mouseWasOver member will now be updated on each mouse event, rather
than on a timer.
2024-10-20 22:59:40 +01:00
reuk
44a84e3a4d
MessageBox: Avoid potential divide-by-zero for boxes with no buttons 2024-10-20 22:59:39 +01:00
reuk
b292ba215a
Component: Ensure global mouse listeners are notified on mouse up
Previously, listeners would sometimes fail to receive mouse up events
blocked by modal components
2024-10-20 22:59:39 +01:00
reuk
6c18a352f1
VST3 Host: Retain parameter timestamps for MIDI CC messages 2024-10-20 22:59:39 +01:00
reuk
67396435e5
DynamicObject: Add virtual functions that are called to indicate a property change 2024-10-20 22:59:39 +01:00