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.

567 lines
21KB

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