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.

86 lines
2.7KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 7 technical preview.
  4. Copyright (c) 2022 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For the technical preview this file cannot be licensed commercially.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. #include "juce_ARAPlugInInstanceRoles.h"
  14. namespace juce
  15. {
  16. bool ARARenderer::processBlock (AudioBuffer<double>& buffer,
  17. AudioProcessor::Realtime realtime,
  18. const AudioPlayHead::CurrentPositionInfo& positionInfo) noexcept
  19. {
  20. ignoreUnused (buffer, realtime, positionInfo);
  21. // If you hit this assertion then either the caller called the double
  22. // precision version of processBlock on a processor which does not support it
  23. // (i.e. supportsDoublePrecisionProcessing() returns false), or the implementation
  24. // of the ARARenderer forgot to override the double precision version of this method
  25. jassertfalse;
  26. return false;
  27. }
  28. //==============================================================================
  29. #if ARA_VALIDATE_API_CALLS
  30. void ARAPlaybackRenderer::addPlaybackRegion (ARA::ARAPlaybackRegionRef playbackRegionRef) noexcept
  31. {
  32. if (araExtension)
  33. ARA_VALIDATE_API_STATE (! araExtension->isPrepared);
  34. ARA::PlugIn::PlaybackRenderer::addPlaybackRegion (playbackRegionRef);
  35. }
  36. void ARAPlaybackRenderer::removePlaybackRegion (ARA::ARAPlaybackRegionRef playbackRegionRef) noexcept
  37. {
  38. if (araExtension)
  39. ARA_VALIDATE_API_STATE (! araExtension->isPrepared);
  40. ARA::PlugIn::PlaybackRenderer::removePlaybackRegion (playbackRegionRef);
  41. }
  42. #endif
  43. //==============================================================================
  44. void ARAEditorView::doNotifySelection (const ARA::PlugIn::ViewSelection* viewSelection) noexcept
  45. {
  46. listeners.call ([&] (Listener& l)
  47. {
  48. l.onNewSelection (*viewSelection);
  49. });
  50. }
  51. void ARAEditorView::doNotifyHideRegionSequences (std::vector<ARA::PlugIn::RegionSequence*> const& regionSequences) noexcept
  52. {
  53. listeners.call ([&] (Listener& l)
  54. {
  55. l.onHideRegionSequences (ARA::vector_cast<ARARegionSequence*> (regionSequences));
  56. });
  57. }
  58. void ARAEditorView::addListener (Listener* l)
  59. {
  60. listeners.add (l);
  61. }
  62. void ARAEditorView::removeListener (Listener* l)
  63. {
  64. listeners.remove (l);
  65. }
  66. } // namespace juce