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.

93 lines
2.9KB

  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. #include "juce_ARAPlugInInstanceRoles.h"
  19. namespace juce
  20. {
  21. bool ARARenderer::processBlock (AudioBuffer<double>& buffer,
  22. AudioProcessor::Realtime realtime,
  23. const AudioPlayHead::PositionInfo& positionInfo) noexcept
  24. {
  25. ignoreUnused (buffer, realtime, positionInfo);
  26. // If you hit this assertion then either the caller called the double
  27. // precision version of processBlock on a processor which does not support it
  28. // (i.e. supportsDoublePrecisionProcessing() returns false), or the implementation
  29. // of the ARARenderer forgot to override the double precision version of this method
  30. jassertfalse;
  31. return false;
  32. }
  33. //==============================================================================
  34. #if ARA_VALIDATE_API_CALLS
  35. void ARAPlaybackRenderer::addPlaybackRegion (ARA::ARAPlaybackRegionRef playbackRegionRef) noexcept
  36. {
  37. if (araExtension)
  38. ARA_VALIDATE_API_STATE (! araExtension->isPrepared);
  39. ARA::PlugIn::PlaybackRenderer::addPlaybackRegion (playbackRegionRef);
  40. }
  41. void ARAPlaybackRenderer::removePlaybackRegion (ARA::ARAPlaybackRegionRef playbackRegionRef) noexcept
  42. {
  43. if (araExtension)
  44. ARA_VALIDATE_API_STATE (! araExtension->isPrepared);
  45. ARA::PlugIn::PlaybackRenderer::removePlaybackRegion (playbackRegionRef);
  46. }
  47. #endif
  48. //==============================================================================
  49. void ARAEditorView::doNotifySelection (const ARA::PlugIn::ViewSelection* viewSelection) noexcept
  50. {
  51. listeners.call ([&] (Listener& l)
  52. {
  53. l.onNewSelection (*viewSelection);
  54. });
  55. }
  56. void ARAEditorView::doNotifyHideRegionSequences (std::vector<ARA::PlugIn::RegionSequence*> const& regionSequences) noexcept
  57. {
  58. listeners.call ([&] (Listener& l)
  59. {
  60. l.onHideRegionSequences (ARA::vector_cast<ARARegionSequence*> (regionSequences));
  61. });
  62. }
  63. void ARAEditorView::addListener (Listener* l)
  64. {
  65. listeners.add (l);
  66. }
  67. void ARAEditorView::removeListener (Listener* l)
  68. {
  69. listeners.remove (l);
  70. }
  71. } // namespace juce