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.

671 lines
24KB

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