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

1171 commits

Author SHA1 Message Date
reuk
cfa289d943
AudioProcessor: Allow querying of the host timestamp in processBlock 2022-04-22 14:18:49 +01:00
reuk
19ddbe2368
Warnings: Fix missing-prototypes warnings 2022-04-22 14:18:48 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
reuk
f77b286b8c
VST3 Client: Work around broken editor resizing in Blue Cat's PatchWork 2022-04-01 16:41:48 +01:00
reuk
cad155bf1c
VST3 Client: Make window sizing slightly more robust in Live
The following was observed for a VST3 plugin hosted in Live 11.1 with
auto-scaling disabled:

- It never calls setContentScaleFactor on the plugin's UI, so the
  wrapper has to check the current display on a timer and update the
  current scale factor when necessary.

- It calls canResize on the plugin view after opening it, but doesn't
  seem to respect the result of this call. According to the VST3
  documentation, a host is supposed to only call checkSizeConstraint
  during a live resize operation (which should only happen if the plugin
  reports it can resize), but Live calls this function every time the
  user drags the editor. It also passes the result of this function to
  onSize, whether or not checkSizeConstraints reported success.

- When dragging an editor between displays, Live will continue to call
  checkSizeConstraint and onSize with the editor’s old size in physical
  pixels. In some cases, JUCE's "scale factor check" timer callback
  fires, resizes the view to the correct size, and then Live
  asynchronously calls onSize again with the editor's old size in
  physical pixels, resulting in the editor being set to the wrong
  logical size.

This patch ensures that checkSizeConstraint always returns the current
size of a nonResizable editor. This means that the logical size of the
editor should not change when the result of checkSizeContraint is used
to resize the window.
2022-04-01 16:41:48 +01:00
reuk
ae646dde16
StandaloneFilterWindow: Account for native frame size in constrainer 2022-04-01 16:41:47 +01:00
reuk
bb2b36a253
VST3 Client: Properly map between VST3 and JUCE layouts 2022-03-23 16:51:40 +00:00
reuk
18300abde9
VST3 Client: Add host API checks to setBusArrangements and activateBus 2022-03-23 16:51:39 +00:00
reuk
ebac835673
Fix some deprecation warnings 2022-03-22 17:27:54 +00:00
reuk
afe5199848
AudioProcessorParameter: Add new ParameterID and Attributes types 2022-03-03 13:47:05 +00:00
reuk
bb0a40e009
AU Client: Order parameters according to version hint 2022-03-03 13:44:49 +00:00
reuk
3d38ca764e
AU Client: Switch HashMap to unordered_map 2022-03-03 13:44:49 +00:00
Tom Poole
111bbc0979 Bump version number to 6.1.6 2022-02-28 12:53:10 +00:00
reuk
288765b3c8
AU Client: Avoid potential out-of-bounds write when clearing buffers
Fixes an issue introduced in 72fa2d98e1
where zeromem might write past the end of the channel buffer.
2022-02-23 10:56:12 +00:00
reuk
89a7d05180
VST3 Client: Avoid calling performEdit during setState
The host is guaranteed to re-scan all parameter values after setting a
new state on the plugin, so there's no need to notify the host about
parameter changes that happen during the setState call.

This also avoids a problem where Bitwig would complain about invalid
parameter IDs in 'engine.log' when loading projects containing JUCE
VST3s. These log messages were produced because a call to setState was
made before Bitwig registered the plugin's parameters, and the setState
call in turn called performEdit with parameter IDs that were yet to be
registered.
2022-02-23 10:56:11 +00:00
reuk
c0b78adcda
StandaloneFilterWindow: Respect editor's size constraints when adjusting size of component peer 2022-02-23 10:56:11 +00:00
reuk
0223e44ae7
Image: Keep track of contiguous buffer size to avoid heap buffer overflows
In CoreGraphicsPixelData::createImage, image data was copied from a
BitmapData created from the Image passed into the function.

The BitmapData instance didn't keep track of the size of the buffer it
pointed to, so the buffer size was computed by multiplying the
BitmapData height by its line stride. However, if the BitmapData pointed
to a subsection of an image, the `data` pointer might be offset from
the allocated region, and `data + lineStride * height` would point past
the end of the allocated region. Trying to read/copy this range would
cause a heap buffer overflow at the end of the range.

This change adjusts BitmapData so that it keeps track of the size of the
allocated region. Taking a subsection of an image should subtract the
data pointer offset from the size of the allocated region.
2022-02-23 10:56:09 +00:00
reuk
068dffdb8c
AudioProcessorEditorHostContext: Fix naming of getContextMenuForParameter 2022-02-18 16:43:25 +00:00
reuk
409aaea43d
AUv3 Client: Add missing autorelease
This autorelease was accidentally removed in
2a199d5225
2022-02-17 16:04:58 +00:00
Attila Szarvas
101a886821 MouseInputSource: Eliminate superfluous drag events caused by pressure change
The bug was triggered on Monterey where a pressure of 1 is reported
while a mouse button is being held down. This caused an extra drag
event being triggered between mouse down and up events, even if no
movement occurred.
2022-02-15 10:53:32 +00:00
reuk
0f06f45098 AUv3: Add timestamps to all parameter changes when possible 2022-02-07 14:24:11 +00:00
reuk
3f315ddd00 Plugin clients: Fix bypass behaviours to match getBypassParameter() documentation 2022-02-07 14:24:11 +00:00
attila
6575d24a81 ComponentPeer: Deprecate getFrameSize() 2022-02-03 21:46:36 +01:00
attila
a7811661c5 Linux: Fix restoreWindowFromStateString() when the peer already exists 2022-02-02 19:53:31 +01:00
reuk
7650a96092
AUv3: Send parameter begin/end gesture events
Note that hosts using the AUv2 API (e.g. JUCE hosts) to host JUCE AUv3
plugins may not receive begin/end gesture events, depending on the OS
version, and potentially the host architecture. I suspect this is
because older versions of the OS-provided AUv2/AUv3 translation layer
don't handle these events.

In testing, an Intel host on Catalina did not receive begin/end events,
but an Arm host on Monterey did receive these events.
2022-01-27 18:43:22 +00:00
Tom Poole
3c03693d07 Bump version number to 6.1.5 2022-01-26 13:00:05 +00:00
reuk
bd52350c00
VST3 Wrapper: Avoid calling processBlock when there is no audio input/output 2022-01-17 10:58:18 +00:00
reuk
640194c878
MinGW: Improve compatibility
With this patch applied, the DemoRunner should build under MinGW, and be
(nearly) feature-complete compared to the MSVC build.

Specifically, when building with MinGW:
- Adds support for accessibility
- Fixes build issues in the juce_video module
- Fixes a link issue in the VST3 wrapper when VST3_CAN_REPLACE_VST2 is
  defined
- Adds support for the new-style native FileChooser
- Tidies up some other low-severity warnings

Known issues:
- Direct2D rendering is still not supported when building with MinGW due
  to ABI compatibilities.
2022-01-17 10:58:18 +00:00
reuk
2678c1d10d
AUv3 Wrapper: Use correct timestamps for outgoing events
Previously, with two instances of the MIDILogger AUv3 in series in
Logic, the timestamps received by the second plugin in the chain would
not match the timestamps of the events emitted by the first plugin.
2022-01-10 22:15:21 +00:00
reuk
43280c3f7f
AU: Tidy up ChannelRemapper 2022-01-10 22:15:19 +00:00
attila
e329f524a2 StandaloneFilterWindow: Take native window borders into account when constraining size 2021-12-21 15:39:24 +00:00
Tom Poole
8a6e1980d0 Bump version number to 6.1.4 2021-12-20 11:06:15 +00:00
reuk
44404508fe Bump version number to 6.1.3 2021-12-08 15:26:08 +00:00
reuk
6f80be1edb
VST3 Client: Ensure editor scale is correct immediately after creation
This fixes a bug where selecting "Always on top" in the plugin editor
window in Cubase 11 on Windows 11 on a display with > 100% scale would
cause the editor to display with the wrong scale factor.

It seems that Cubase calls removed() then attached() on the plugin view,
destroying and recreating the editor wrapper component. The editor
opened with 100% scale, but requests from the host to set the "real"
scale factor were ignored because the JUCE wrapper thought that the
requested scale had already been applied.

Applying the cached scale factor directly after constructing the editor
keeps everything in a consistent state, and seems to resolve the issue.
2021-11-24 16:20:36 +00:00
reuk
144b444f93
VST2 Client: Reapply custom scale factor if scale is set before editor is opened 2021-11-24 16:20:36 +00:00
reuk
7d8c5b845d
AU: Cache MIDI output block 2021-11-24 16:20:35 +00:00
reuk
6de3af3566
AU: Make channel/bus handling more robust 2021-11-24 16:20:35 +00:00
reuk
81fa777ff7
ObjC Helpers: Automatically derive appropriate signature for function 2021-11-24 11:51:11 +00:00
reuk
3850a2bb20
AudioPlayHead: Update wrappers to use new FrameRate type 2021-11-19 16:35:22 +00:00
reuk
cccb3d360a
AAX Client: Avoid overwriting bypass parameter value on state recall 2021-11-01 10:04:34 +00:00
reuk
4ca923a34b
NSViewComponentPeer: Allow mouse events to reach unfocused windows
This change allows mouse events (including enter and exit events) to
reach unfocused views on macOS. This matches the behaviour of unfocused
windows on Linux and Windows, where components paint in their "hovered"
states even when the application window is in the background.

As a byproduct of using tracking areas on macOS, we can remove the fake
mouse move generator.
2021-10-27 16:33:37 +01:00
reuk
4c2dba0822
VST3 Client: Ensure that all programs can be selected via parameter in hosts
Hosts such as REAPER normalise the program parameter value by dividing
the program value by the step count, rather than going via the
parameter's toNormalized function. To be compatible, we should use the
same scaling technique. At time of writing, the coversion process is
detailed under the heading "Conversion of normalized values" on this
page:

https://developer.steinberg.help/display/VST/Parameters+and+Automation
2021-10-26 16:52:15 +01:00
attila
63ac579c1b VST3 Client: Fix build when JUCE_VST3_CAN_REPLACE_VST2 is enabled 2021-10-14 18:56:18 +02:00
reuk
718097fd60
StandaloneFilterWindow: Avoid recursively resizing plugin editor 2021-10-14 13:15:25 +01:00
ed
7d1918b385 macOS/iOS: Replace compile-time deployment target checks with runtime checks using the available keyword 2021-10-13 15:06:18 +01:00
reuk
47dcc31e77
VST3 Client: Allow setting latency from inside prepareToPlay 2021-10-07 14:31:26 +01:00
reuk
e797c993a8
AAX Client: Add dirty state reporting via updateHostDisplay 2021-10-06 16:59:08 +01:00
reuk
294caba2b5
VST3: Add dirty-state set/get
Adds a mechanism to notify the host that the plugin state needs saving,
using updateHostDisplay.

Also allows JUCE hosts to detect when a plugin needs its state saving
via the AudioProcessorListener.
2021-10-06 16:59:07 +01:00
ed
b9542ccc4c Update code to use C++14 [[deprecated]] attribute
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
2021-09-29 16:14:00 +01:00
ed
d39d0f4885 Docs: Fix some Doxygen warnings 2021-09-29 16:11:30 +01:00