The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

649 lines
23KB

  1. JUCE breaking changes
  2. =====================
  3. Develop
  4. =======
  5. Version 5.3.0
  6. =============
  7. Change
  8. ------
  9. The JUCE examples have been cleaned up, modernised and converted into
  10. PIPs (Projucer Instant Projects). The JUCE Demo has been removed and replaced by the
  11. DemoRunner application and larger projects such as the Audio Plugin Host and the
  12. Network Graphics Demo have been moved into the extras directory.
  13. Possible Issues
  14. ---------------
  15. 1. Due to the large number of changes that have occured in the JUCE Git repository,
  16. pulling this version may result in a messy folder structure with empty directories
  17. that have been removed.
  18. 2. The JUCE Demo project is no longer in the JUCE repository.
  19. 3. The Audio Plugin Host project has moved from the examples directory to the extras
  20. directory.
  21. Workaround
  22. ----------
  23. 1. Run a Git clean command (git clean -xdf) in your JUCE directory to remove all untracked
  24. files, directories and build products.
  25. 2. The new DemoRunner application, located in extras/DemoRunner, can be used to preview
  26. all the JUCE examples and see the code side-by-side.
  27. 3. Change any file paths that depended on the plugin host project being located in the examples
  28. directory to use the extras directory instead.
  29. Rationale
  30. ---------
  31. The JUCE examples had inconsistent naming, coding styles and the projects and build products
  32. took up a large amount of space in the repository. Replacing them with PIPs reduces the file size
  33. and allows us to categorise the examples better, as well as cleaning up the code.
  34. Change
  35. ------
  36. When hosting plug-ins all AudioProcessor methods of managing parameters that
  37. take a parameter index as an argument have been deprecated.
  38. Possible Issues
  39. ---------------
  40. A single assertion will be fired in debug builds on the first use of a
  41. deprecated function.
  42. Workaround
  43. ----------
  44. When hosting plug-ins you should use the AudioProcessor::getParameters() method
  45. and interact with parameters via the returned array of
  46. AudioProcessorParameters. For a short-term fix you can also continue past the
  47. assertion in your debugger, or temporarily modify the JUCE source code to
  48. remove it.
  49. Rationale
  50. ---------
  51. Given the structure of JUCE's API it is impossible to deprecate these functions
  52. using only compile-time messages. Therefore a single assertion, which can be
  53. safely ignored, serves to indicate that these functions should no longer be
  54. used. The move away from the AudioProcessor methods both improves the interface
  55. to that class and makes ongoing development work much easier.
  56. Change
  57. ------
  58. This InAppPurchases class is now a JUCE Singleton. This means that you need
  59. to get an instance via InAppPurchases::getInstance(), instead of storing a
  60. InAppPurchases object yourself.
  61. Possible Issues
  62. ---------------
  63. Any code using InAppPurchases needs to be updated to retrieve a singleton pointer
  64. to InAppPurchases.
  65. Workaround
  66. ----------
  67. Instead of holding a InAppPurchase member yourself, you should get an instance
  68. via InAppPurchases::getInstance(), e.g.
  69. instead of:
  70. InAppPurchases iap;
  71. iap.purchaseProduct (...);
  72. call:
  73. InAppPurchases::getInstance()->purchaseProduct (...);
  74. Rationale
  75. ---------
  76. This change was required to fix an issue on Android where on failed transaction
  77. a listener would not get called.
  78. Change
  79. ------
  80. JUCE's MPE classes have been updated to reflect the official specification
  81. recently approved by the MIDI Manufacturers Association (MMA).
  82. Possible Issues
  83. ---------------
  84. The most significant changes have occurred in the MPEZoneLayout classes and
  85. programs using the higher level MPE classes such as MPEInstrument,
  86. MPESynthesiser, MPESynthesiserBase and MPESynthesiserVoice should be
  87. unaffected.
  88. Previously, any MIDI channel from 1 - 15 could be selected to be the master
  89. channel of an MPE zone, with a specified number of member channels ascending
  90. from the master channel + 1. However, in the new specification this has been
  91. simplified so that a device only has a lower and/or an upper zone, where the
  92. lower zone has master channel 1 and assigns new member channels ascending from
  93. channel 2 and the upper zone has master channel 16 and assigns new member
  94. channels descending from channel 15.
  95. Workaround
  96. ----------
  97. Use the MPEZoneLayout::setLowerZone() and MPEZoneLayout::setUpperZone() methods
  98. to set zone layouts.
  99. Any UI that allows users to select and set zones on an MPE instrument should
  100. also be updated to reflect the specification changes.
  101. Rationale
  102. ---------
  103. The MPE classes in JUCE are out of date and should be updated to reflect the
  104. new, official MPE standard.
  105. Version 5.2.1
  106. =============
  107. Change
  108. ------
  109. Calling JUCEApplicationBase::quit() on Android will now really quit the app,
  110. rather than just placing it in background. Starting with API level 21 (Android
  111. 5.0), the app will not appear in recent apps list after calling quit(). Prior
  112. to API 21, the app will still appear in recent app lists but when a user
  113. chooses the app, a new instance of the app will be started.
  114. Possible Issues
  115. ---------------
  116. Any code calling JUCEApplicationBase::quit() to place the app in background
  117. will close the app instead.
  118. Workaround
  119. ----------
  120. Use Process::hide().
  121. Rationale
  122. ---------
  123. The old behaviour JUCEApplicationBase::quit() was confusing JUCE code, as a new
  124. instance of JUCE app was attempted to be created, while the older instance was
  125. still running in background. This would result in assertions when starting a
  126. second instance.
  127. Change
  128. ------
  129. On Windows, release builds will now link to the dynamic C++ runtime by default
  130. Possible Issues
  131. ---------------
  132. If you are creating a new .jucer project, then your plug-in will now link to
  133. the dynamic C++ runtime by default, which means that you MUST ensure that the
  134. C++ runtime libraries exist on your customer's computers.
  135. Workaround
  136. ----------
  137. If you are only targeting Windows 10, then the C++ runtime is now part of the
  138. system core components and will always exist on the computers of your customers
  139. (just like kernel332.dll, for example). If you are targeting Windows versions
  140. between Vista and Windows 10, then you should build your plug-in with the
  141. latest updated version of VS2015 or later, which ensures that it's linked to
  142. the universal runtime. Universal runtime is part of the system's core libraries
  143. on Windows 10 and on Windows versions Vista to 8.1, it will be available on
  144. your customer's computers via Windows Update. Unfortunately, if your customer
  145. has just installed Windows 8.1 to Vista on a fresh computer, then there is a
  146. chance that the update mechanism for the universal runtime hasn't triggered yet
  147. and your plug-in may still fail. Your installer should prompt the user to
  148. install all the Windows updates in this case or you can deploy the universal
  149. runtime as a redistributable with your installer. If you are targeting earlier
  150. versions of Windows then you should always include the runtime as a
  151. redistributable with your plug-in's installer. Alternatively, you can change
  152. the runtime linking to static (however, see 'Rationale' section).
  153. Rationale
  154. ---------
  155. In a recent update to Windows 10, Microsoft has limited the number of fiber
  156. local storage (FLS) slots per process. Effectively, this limits how many
  157. plug-ins with static runtime linkage can be loaded into a DAW. In the worst
  158. case, this limits the total number of plug-ins to a maximum of 64 plug-ins.
  159. There is no workaround for DAW vendors and the only solution is to push plug-in
  160. vendors to use the dynamic runtime. To help with this, JUCE has decided to make
  161. dynamic runtime linkage the default in JUCE.
  162. Change
  163. ------
  164. AudioProcessorGraph interface has changed in a number of ways - Node objects
  165. are now reference counted, there are different accessor methods to iterate
  166. them, and misc other small improvements to the API
  167. Possible Issues
  168. ---------------
  169. The changes won't cause any silent errors in user code, but will require some
  170. manual refactoring
  171. Workaround
  172. ----------
  173. Just find equivalent new methods to replace existing code.
  174. Rationale
  175. ---------
  176. The graph class was extremely old and creaky, and these changes is the start of
  177. an improvement process that should eventually result in it being broken down
  178. into fundamental graph building block classes for use in other contexts.
  179. Version 5.2.0
  180. =============
  181. Change
  182. ------
  183. Viewport now enables "scroll on drag" mode by default on Android and iOS.
  184. Possible Issues
  185. ---------------
  186. Any code relying on "scroll on drag" mode being turned off by default, should
  187. disable it manually.
  188. Workaround
  189. ----------
  190. None.
  191. Rationale
  192. ---------
  193. It is expected on mobile devices to be able to scroll a list by just a drag,
  194. rather than using a dedicated scrollbar. The scrollbar is still available
  195. though if needed.
  196. Change
  197. ------
  198. The previous setting of Android exporter "Custom manifest xml elements"
  199. creating child nodes of <application> element has been replaced by "Custom
  200. manifest XML content" setting that allows to specify the content of the entire
  201. manifest instead. Any previously values of the old setting will be used in the
  202. new setting by default, and they will need changing as mentioned in Workaround.
  203. The custom content will be merged with the content auto-generated by Projucer.
  204. Any custom elements or custom attributes will override the ones set by
  205. Projucer. Projucer will also automatically add any missing and required
  206. elements and attributes.
  207. Possible Issues
  208. ---------------
  209. If a Projucer project used "Custom manifest xml elements" field, the value will
  210. no longer be compatible with the project generated in the latest Projucer
  211. version. The solution is very simple and quick though, as mentioned in the
  212. Workaround section.
  213. Workaround
  214. ----------
  215. For any elements previously used, simply embed them explicitly in
  216. <manifest><application> elements, for example instead of:
  217. <meta-data android:name="paramId1" android:value="paramValue1"/>
  218. <meta-data android:name="paramId2" android:value="paramValue2"/>
  219. simply write:
  220. <manifest>
  221. <application>
  222. <meta-data android:name="paramId1" android:value="paramValue1"/>
  223. <meta-data android:name="paramId2" android:value="paramValue2"/>
  224. </application>
  225. </manifest>
  226. Rationale
  227. ---------
  228. To maintain the high level of flexibility of generated Android projects and to
  229. avoid creating fields in Projucer for every possible future parameter, it is
  230. simpler to allow to set up the required parameters manually. This way it is not
  231. only possible to add any custom elements but it is also possible to override
  232. the default attributes assigned by Projucer for the required elements. For
  233. instance, if the default value of <supports-screens> element is not
  234. satisfactory because you want a support for x-large screens only, simply set
  235. "Custom manifest XML content" to:
  236. <manifest>
  237. <supports-screens android:xlargeScreens="true"/>
  238. </manifest>
  239. Version 5.1.2
  240. =============
  241. Change
  242. ------
  243. The method used to classify AudioUnit, VST3 and AAX plug-in parameters as
  244. either continuous or discrete has changed, and AudioUnit and AudioUnit v3
  245. parameters are marked as high precision by default.
  246. Possible Issues
  247. ---------------
  248. Plug-ins: DAW projects with automation data written by an AudioUnit, AudioUnit
  249. v3 VST3 or AAX plug-in built with JUCE version 5.1.1 or earlier may load
  250. incorrectly when opened by an AudioUnit, AudioUnit v3, VST3 or AAX plug-in
  251. built with JUCE version 5.1.2 and later.
  252. Hosts: The AudioPluginInstance::getParameterNumSteps method now returns correct
  253. values for AU and VST3 plug-ins.
  254. Workaround
  255. ----------
  256. Plug-ins: Enable JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE in the
  257. juce_audio_plugin_client module config page in the Projucer.
  258. Hosts: Use AudioPluginInstance::getDefaultNumParameterSteps as the number of
  259. steps for all parameters.
  260. Rationale
  261. ---------
  262. The old system for presenting plug-in parameters to a host as either continuous
  263. or discrete is inconsistent between plug-in types and lacks sufficient
  264. flexibility. This change harmonises the behaviour and allows individual
  265. parameters to be marked as continuous or discrete. If AudioUnit and AudioUnit
  266. v3 parameters are not marked as high precision then hosts like Logic Pro only
  267. offer a limited number of parameter values, which again produces different
  268. behaviour for different plug-in types.
  269. Change
  270. ------
  271. A new FrameRateType fps23976 has been added to AudioPlayHead,
  272. Possible Issues
  273. ---------------
  274. Previously JUCE would report the FrameRateType fps24 for both 24 and 23.976
  275. fps. If your code uses switch statements (or similar) to handle all possible
  276. frame rate types, then this change may cause it to fall through.
  277. Workaround
  278. ----------
  279. Add fps23976 to your switch statement and handle it appropriately.
  280. Rationale
  281. ---------
  282. JUCE should be able to handle all popular frame rate codes but was missing
  283. support for 23.976.
  284. Change
  285. ------
  286. The String (bool) constructor and operator<< (String&, bool) have been
  287. explicitly deleted.
  288. Possible Issues
  289. ---------------
  290. Previous code which relied on an implicit bool to int type conversion to
  291. produce a String will not compile.
  292. Workaround
  293. ----------
  294. Cast your bool to an integer to generate a string representation of it.
  295. Rationale
  296. ---------
  297. Letting things implicitly convert to bool to produce a String opens the door to
  298. all kinds of nasty type conversion edge cases. Furthermore, before this change,
  299. MacOS would automatically convert bools to ints but this wouldn't occur on
  300. different platform. Now the behaviour is consistent across all operating
  301. systems supported by JUCE.
  302. Change
  303. ------
  304. The writeAsJSON virtual method of the DynamicObject class requires an
  305. additional parameter, maximumDecimalPlaces, to specify the maximum precision of
  306. floating point numbers.
  307. Possible Issues
  308. ---------------
  309. Classes which inherit from DynamicObject and override this method will need to
  310. update their method signature.
  311. Workaround
  312. ----------
  313. Your custom DynamicObject class can choose to ignore the additional parameter
  314. if you don't wish to support this behaviour.
  315. Rationale
  316. ---------
  317. When serialising the results of calculations to JSON the rounding of floating
  318. point numbers can result in numbers with 17 significant figures where only a
  319. few are required. This change to DynamicObject is required to support
  320. truncating those numbers.
  321. Version 5.1.0
  322. =============
  323. Change
  324. ------
  325. The option to set the C++ language standard is now located in the project
  326. settings instead of the build configuration settings.
  327. Possible Issues
  328. ---------------
  329. Projects that had a specific verison of the C++ language standard set for
  330. exporter build configurations will instead use the default (C++11) when
  331. re-saving with the new Projucer.
  332. Workaround
  333. ----------
  334. Change the "C++ Language Standard" setting in the main project settings to the
  335. required version - the Projucer will add this value to the exported project as
  336. a compiler flag when saving exporters.
  337. Rationale
  338. ---------
  339. Having a different C++ language standard option for each build configuration
  340. was unnecessary and was not fully implemented for all exporters. Changing it to
  341. a per-project settings means that the preference will propagate to all
  342. exporters and only needs to be set in one place.
  343. Change
  344. ------
  345. PopupMenus now scale according to the AffineTransform and scaling factor of
  346. their target components.
  347. Possible Issues
  348. ---------------
  349. Developers who have manually scaled their PopupMenus to fit the scaling factor
  350. of the parent UI will now have the scaling applied two times in a row.
  351. Workaround
  352. ----------
  353. 1. Do not apply your own manual scaling to make your popups match the UI
  354. scaling
  355. or
  356. 2. Override the Look&Feel method
  357. PopupMenu::LookAndFeelMethods::shouldPopupMenuScaleWithTargetComponent and
  358. return false. See
  359. https://github.com/WeAreROLI/JUCE/blob/c288c94c2914af20f36c03ca9c5401fcb555e4e9/modules/juce_gui_basics/menus/juce_PopupMenu.h#725
  360. Rationale
  361. ---------
  362. Previously, PopupMenus would not scale if the GUI of the target component (or
  363. any of it’s parents) were scaled. The only way to scale PopupMenus was via the
  364. global scaling factor. This had several drawbacks as the global scaling factor
  365. would scale everything. This was especially problematic in plug-in editors.
  366. Change
  367. ------
  368. Removed the setSecurityFlags() method from the Windows implementation of
  369. WebInputStream as it disabled HTTPS security features.
  370. Possible Issues
  371. ---------------
  372. Any code previously relying on connections to insecure webpages succeeding will
  373. no longer work.
  374. Workaround
  375. ----------
  376. Check network connectivity on Windows and re-write any code that relied on
  377. insecure connections.
  378. Rationale
  379. ---------
  380. The previous behaviour resulted in network connections on Windows having all
  381. the HTTPS security features disabled, exposing users to network attacks. HTTPS
  382. connections on Windows are now secure and will fail when connecting to an
  383. insecure web address.
  384. Change
  385. ------
  386. Pointer arithmetic on a pointer will have the same result regardless if it is
  387. wrapped in JUCE's Atomic class or not.
  388. Possible Issues
  389. ---------------
  390. Any code using pointer arithmetic on Atomic<T*> will now have a different
  391. result leading to undefined behaviour or crashes.
  392. Workaround
  393. ----------
  394. Re-write your code in a way that it does not depend on your pointer being
  395. wrapped in JUCE's Atomic or not. See rationale.
  396. Rationale
  397. ---------
  398. Before this change, pointer arithmetic with JUCE's Atomic type would yield
  399. confusing results. For example, the following code would assert before this
  400. change:
  401. int* a; Atomic<int*> b;
  402. jassert (++a == ++b);
  403. Pointer a in the above code would be advanced by sizeof(int) whereas the JUCE's
  404. Atomic always advances it's underlying pointer by a single byte. The same is
  405. true for operator+=/operator-= and operator--. The difference in behaviour is
  406. confusing and unintuitive. Furthermore, this aligns JUCE's Atomic type with
  407. std::atomic.
  408. Version 4.3.1
  409. =============
  410. Change
  411. ------
  412. JUCE has changed the way native VST3/AudioUnit parameter ids are calculated.
  413. Possible Issues
  414. ---------------
  415. DAW projects with automation data written by an AudioUnit or VST3 plug-in built
  416. with pre JUCE 4.3.1 versions will load incorrectly when opened by an AudioUnit
  417. or VST3 built with JUCE versions 4.3.1 and later. Plug-ins using
  418. JUCE_FORCE_USE_LEGACY_PARAM_IDS are not affected.
  419. Workaround
  420. ----------
  421. Disable JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS in the
  422. juce_audio_plugin_client module config page in the Projucer. For new plug-ins,
  423. be sure to use the default value for this property.
  424. Rationale
  425. --------
  426. JUCE needs to convert between its own JUCE parameter id format (strings) to the
  427. native parameter id formats of the various plug-in backends. For VST3 and
  428. AudioUnits, JUCE uses a hash function to generate a numeric id. However, some
  429. VST3/AudioUnit hosts (specifically Studio One) have a bug that ignore any
  430. parameters that have a negative parameter id. Therefore, the hash function for
  431. VST3/AudioUnits needed to be changed to only return positive-valued hashes.
  432. Version 4.3.0
  433. =============
  434. Change
  435. ------
  436. A revised multi-bus API was released which supersedes the previously flawed
  437. multi-bus API - JUCE versions 4.0.0 - 4.2.4 (inclusive).
  438. Possible Issues
  439. ---------------
  440. If you have developed a plug-in with JUCE versions 4.0.0 - 4.2.4 (inclusive),
  441. then you will need to update your plug-in to the new multi-bus API. Pre JUCE
  442. 4.0.0 plug-ins are not affected apart from other breaking changes listed in
  443. this document.
  444. Woraround
  445. ---------
  446. None.
  447. Rationale
  448. --------
  449. A flawed multi-bus API was introduced with JUCE versions 4.0.0 up until version
  450. 4.2.4 (inclusive) which was not API compatible with pre JUCE 4 plug-ins. JUCE
  451. 4.3.0 releases a revised multi-bus API which restores pre JUCE 4 API
  452. compatibility. However, the new multi-bus API is not compatible with the flawed
  453. multi-bus API (JUCE version 4.0.0 - 4.2.4).
  454. Change
  455. ------
  456. JUCE now generates the AAX plug-in bus layout configuration id independent from
  457. the position as it appears in the Projucer’s legacy "Channel layout
  458. configuration" field.
  459. Possible Issues
  460. ---------------
  461. ProTools projects generated with a < 4.3.0 JUCE versions of your plug-in, may
  462. load the incorrect bus configuration when upgrading your plug-in to >= 4.3.0
  463. versions of JUCE.
  464. Workaround
  465. ----------
  466. Implement AudioProcessor’s getAAXPluginIDForMainBusConfig callback to manually
  467. override which AAX plug-in id is associated to a specific bus layout of your
  468. plug-in. This workaround is only necessary if you have released your plug-in
  469. built with a version previous to JUCE 4.3.0.
  470. Rationale
  471. --------
  472. The new multi-bus API offers more features, flexibility and accuracy in
  473. specifying bus layouts which cannot be expressed by the Projucer’s legacy
  474. "Channel layout configuration" field. The native plug-in format backends use
  475. the new multi-bus callback APIs to negotiate channel layouts with the host -
  476. including the AAX plug-in ids assigned to specific bus layouts. With the
  477. callback API, there is no notion of an order in which the channel
  478. configurations appear - as was the case with the legacy "Channel layout
  479. configuration" field - and therefore cannot be used to generate the AAX plug-in
  480. id. To remain backward compatible to pre JUCE 4.0.0 plug-ins, JUCE does
  481. transparently convert the legacy "Channel layout configuration" field to the
  482. new callback based multi-bus API, but this does not take the order into account
  483. in which the channel configurations appear in the legacy "Channel layout
  484. configuration" field.
  485. Version 4.2.1
  486. =============
  487. Change
  488. ------
  489. JUCE now uses the paramID property used in AudioProcessorParameterWithID to
  490. uniquely identify parameters to the host.
  491. Possible Issues
  492. ---------------
  493. DAW projects with automation data written by an audio plug-in built with pre
  494. JUCE 4.2.1 will load incorrectly when opened by an audio plug-in built with
  495. JUCE 4.2.1 and later.
  496. Workaround
  497. ----------
  498. Enable JUCE_FORCE_USE_LEGACY_PARAM_IDS in the juce_audio_plugin_client module config
  499. page in the Projucer. For new plug-ins, be sure to disable this property.
  500. Rationale
  501. --------
  502. Each parameter of the AudioProcessor has an id associated so that the plug-in’s
  503. host can uniquely identify parameters. The id has a different data-type for
  504. different plug-in types (for example VST uses integers, AAX uses string
  505. identifiers). Before 4.2.1, JUCE generated the parameter id by using the index
  506. of the parameter, i.e. the first parameter had id zero, the second parameter
  507. had id one, etc. This caused problems for certain plug-in types where JUCE
  508. needs to add internal parameters to the plug-in (for example VST3 requires the
  509. bypass control to be a parameter - so JUCE automatically creates this parameter
  510. for you in the VST3 backend). This causes subtle problems if a parameter is
  511. added to an update of an already published plug-in. The new parameter’s id
  512. would be identical to the id of the bypass parameter in old versions of your
  513. plug-in, causing seemingly random plug-in bypass behaviour when user’s upgrade
  514. their plug-in.
  515. Most plug-in backends differentiate between a parameter’s id an index, so this
  516. distinction was adopted starting with JUCE 4.2.1 by deriving the parameter’s
  517. unique id from the paramID property of AudioProcessorParameterWithID class.