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.

104 lines
3.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2022 - Raw Material Software Limited
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 7 End-User License
  8. Agreement and JUCE Privacy Policy.
  9. End User License Agreement: www.juce.com/juce-7-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. namespace juce
  19. {
  20. int32 AAXClientExtensions::getPluginIDForMainBusConfig (const AudioChannelSet& mainInputLayout,
  21. const AudioChannelSet& mainOutputLayout,
  22. bool idForAudioSuite) const
  23. {
  24. int uniqueFormatId = 0;
  25. for (int dir = 0; dir < 2; ++dir)
  26. {
  27. const bool isInput = (dir == 0);
  28. auto& set = (isInput ? mainInputLayout : mainOutputLayout);
  29. int aaxFormatIndex = 0;
  30. const AudioChannelSet sets[]
  31. {
  32. AudioChannelSet::disabled(),
  33. AudioChannelSet::mono(),
  34. AudioChannelSet::stereo(),
  35. AudioChannelSet::createLCR(),
  36. AudioChannelSet::createLCRS(),
  37. AudioChannelSet::quadraphonic(),
  38. AudioChannelSet::create5point0(),
  39. AudioChannelSet::create5point1(),
  40. AudioChannelSet::create6point0(),
  41. AudioChannelSet::create6point1(),
  42. AudioChannelSet::create7point0(),
  43. AudioChannelSet::create7point1(),
  44. AudioChannelSet::create7point0SDDS(),
  45. AudioChannelSet::create7point1SDDS(),
  46. AudioChannelSet::create7point0point2(),
  47. AudioChannelSet::create7point1point2(),
  48. AudioChannelSet::ambisonic (1),
  49. AudioChannelSet::ambisonic (2),
  50. AudioChannelSet::ambisonic (3),
  51. AudioChannelSet::create5point0point2(),
  52. AudioChannelSet::create5point1point2(),
  53. AudioChannelSet::create5point0point4(),
  54. AudioChannelSet::create5point1point4(),
  55. AudioChannelSet::create7point0point4(),
  56. AudioChannelSet::create7point1point4(),
  57. AudioChannelSet::create7point0point6(),
  58. AudioChannelSet::create7point1point6(),
  59. AudioChannelSet::create9point0point4(),
  60. AudioChannelSet::create9point1point4(),
  61. AudioChannelSet::create9point0point6(),
  62. AudioChannelSet::create9point1point6(),
  63. AudioChannelSet::ambisonic (4),
  64. AudioChannelSet::ambisonic (5),
  65. AudioChannelSet::ambisonic (6),
  66. AudioChannelSet::ambisonic (7)
  67. };
  68. const auto index = (int) std::distance (std::begin (sets), std::find (std::begin (sets), std::end (sets), set));
  69. if (index != numElementsInArray (sets))
  70. aaxFormatIndex = index;
  71. else
  72. jassertfalse;
  73. uniqueFormatId = (uniqueFormatId << 8) | aaxFormatIndex;
  74. }
  75. return (idForAudioSuite ? 0x6a796161 /* 'jyaa' */ : 0x6a636161 /* 'jcaa' */) + uniqueFormatId;
  76. }
  77. String AAXClientExtensions::getPageFileName() const
  78. {
  79. #ifdef JucePlugin_AAXPageTableFile
  80. #warning "JucePlugin_AAXPageTableFile is deprecated, instead implement AAXClientExtensions::getPageFileName()"
  81. return JucePlugin_AAXPageTableFile;
  82. #else
  83. return {};
  84. #endif
  85. }
  86. } // namespace juce