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.

28 lines
701B

  1. /*!
  2. @file AudioUnitSDK/AUOutputElement.cpp
  3. @copyright © 2000-2021 Apple Inc. All rights reserved.
  4. */
  5. #include <AudioUnitSDK/AUBase.h>
  6. #include <AudioUnitSDK/AUOutputElement.h>
  7. namespace ausdk {
  8. AUOutputElement::AUOutputElement(AUBase& audioUnit) : AUIOElement(audioUnit) { AllocateBuffer(); }
  9. AUOutputElement::AUOutputElement(AUBase& audioUnit, const AudioStreamBasicDescription& format)
  10. : AUIOElement{ audioUnit, format }
  11. {
  12. AllocateBuffer();
  13. }
  14. OSStatus AUOutputElement::SetStreamFormat(const AudioStreamBasicDescription& desc)
  15. {
  16. const OSStatus result = AUIOElement::SetStreamFormat(desc); // inherited
  17. if (result == noErr) {
  18. AllocateBuffer();
  19. }
  20. return result;
  21. }
  22. } // namespace ausdk