1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00
JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins. https://juce.com
Find a file
reuk c8dae58fd2
VST3 Host: Avoid calling processBlock, prepareToPlay, and releaseResources simultaneously
The old design had us checking isActive inside our audio callbacks, and
also modifying isActive from prepareToPlay(), and releaseResources(). To
avoid race conditions, and to ensure that isActive actually reflects the
activation state of our plugin, we need to lock in these places. If we
don't lock, there's a chance that other threads will observe isActive to
be true while the plugin is not actually active (for example).

If you're not convinced, imagine this scenario:
- The message thread calls prepareToPlay. The plugin is activated.
- The audio thread starts calling processBlock, and gets as far as the
  isActive check. The plugin appears active, so we continue into
  processBlock.
- At the same time, the message thread calls releaseResources(). The
  processBlock call is still in progress, but the message thread is
  simultaneously making calls to setProcessing() and setActive(), which
  is a race.

Normally, it'd be up to the host of the AudioProcessor to ensure that
prepareToPlay() isn't called at the same time as processBlock().
However, VST3 plugins can request a restart at any time from the UI
thread, requiring us to call prepareToPlay() even while processBlock()
is running.
2021-05-12 11:14:34 +01:00
.github Updated the GitHub issue reporting instructions 2017-09-26 12:29:17 +01:00
docs CMake: Update source groups documentation 2021-05-11 12:08:56 +01:00
examples Re-saved all projects 2021-05-10 10:53:14 +01:00
extras Projucer: Attempt to validate licence stored on disk if auth token is present without version 2021-05-11 11:49:11 +01:00
modules VST3 Host: Avoid calling processBlock, prepareToPlay, and releaseResources simultaneously 2021-05-12 11:14:34 +01:00
.gitignore Fixed a typo in .gitignore 2020-10-12 16:21:44 +01:00
.gitlab-ci.yml Added GitLab CI config 2019-06-11 16:57:31 +01:00
BREAKING-CHANGES.txt Accessibility: Added VoiceOver (macOS) and Narrator (Windows) accessibility screen reader support to juce_gui_basics 2021-05-10 10:53:14 +01:00
ChangeList.txt Bump version number to 6.0.8 2021-03-22 09:24:48 +00:00
CMakeLists.txt Bump version number to 6.0.8 2021-03-22 09:24:48 +00:00
LICENSE.md Added JUCE 6 LICENSE.md 2020-06-29 08:30:23 +01:00
README.md Docs: Updated the README banner image 2021-03-23 15:55:48 +00:00

alt text

JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VST, AU (and AUv3), RTAS and AAX audio plug-ins. JUCE can be easily integrated with existing projects or can be used as a project generation tool via the Projucer, which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio, Code::Blocks, CLion and Linux Makefiles as well as containing a source code editor and live-coding engine which can be used for rapid prototyping.

Getting Started

The JUCE repository contains a master and develop branch. The develop branch contains the latest bugfixes and features and is periodically merged into the master branch in stable tagged releases (the latest release containing pre-built binaries can be also downloaded from the JUCE website).

JUCE projects can be managed with either the Projucer (JUCE's own project-configuration tool) or with CMake.

The Projucer

The repository doesn't contain a pre-built Projucer so you will need to build it for your platform - Xcode, Visual Studio and Linux Makefile projects are located in extras/Projucer/Builds (the minumum system requirements are listed in the System Requirements section below). The Projucer can then be used to create new JUCE projects, view tutorials and run examples. It is also possible to include the JUCE modules source code in an existing project directly, or build them into a static or dynamic library which can be linked into a project.

For further help getting started, please refer to the JUCE documentation and tutorials.

CMake

Version 3.15 or higher is required for plugin projects, and strongly recommended for other project types. To use CMake, you will need to install it, either from your system package manager or from the official download page. For comprehensive documentation on JUCE's CMake API, see the JUCE CMake documentation. For examples which may be useful as starting points for new CMake projects, see the CMake examples directory.

Building Examples

To use CMake to build the examples and extras bundled with JUCE, simply clone JUCE and then run the following commands, replacing "DemoRunner" with the name of the target you wish to build.

cd /path/to/JUCE
cmake . -B cmake-build -DJUCE_BUILD_EXAMPLES=ON -DJUCE_BUILD_EXTRAS=ON
cmake --build cmake-build --target DemoRunner

Minimum System Requirements

Building JUCE Projects

  • macOS/iOS: macOS 10.11 and Xcode 7.3.1
  • Windows: Windows 8.1 and Visual Studio 2015 64-bit
  • Linux: GCC 4.8 (for a full list of dependencies, see here).
  • Android: Android Studio on Windows, macOS or Linux

Deployment Targets

  • macOS: macOS 10.7
  • Windows: Windows Vista
  • Linux: Mainstream Linux distributions
  • iOS: iOS 9.0
  • Android: Jelly Bean (API 16)

Contributing

For bug reports and features requests, please visit the JUCE Forum - the JUCE developers are active there and will read every post and respond accordingly. When submitting a bug report, please ensure that it follows the issue template. We don't accept third party GitHub pull requests directly due to copyright restrictions but if you would like to contribute any changes please contact us.

License

The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core and juce_events) are permissively licensed under the terms of the ISC license. Other modules are covered by a GPL/Commercial license.

There are multiple commercial licensing tiers for JUCE, with different terms for each:

  • JUCE Personal (developers or startup businesses with revenue under 50K USD) - free
  • JUCE Indie (small businesses with revenue under 500K USD) - $40/month
  • JUCE Pro (no revenue limit) - $130/month
  • JUCE Educational (no revenue limit) - free for bona fide educational institutes

For full terms see LICENSE.md.