Audio plugin host https://kx.studio/carla
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.

100 lines
2.7KB

  1. /*
  2. * DISTRHO Plugin Framework (DPF)
  3. * Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. * or without fee is hereby granted, provided that the above copyright notice and this
  7. * permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  10. * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  11. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  12. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  13. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef DISTRHO_STANDALONE_UTILS_HPP_INCLUDED
  17. #define DISTRHO_STANDALONE_UTILS_HPP_INCLUDED
  18. #include "src/DistrhoDefines.h"
  19. START_NAMESPACE_DISTRHO
  20. /* ------------------------------------------------------------------------------------------------------------
  21. * Standalone plugin related utilities */
  22. /**
  23. @defgroup StandalonePluginRelatedUtilities Plugin related utilities
  24. When the plugin is running as standalone and JACK is not available, a native audio handling is in place.
  25. It is a very simple handling, auto-connecting to the default audio interface for outputs.
  26. !!EXPERIMENTAL!!
  27. Still under development and testing.
  28. @{
  29. */
  30. /**
  31. Check if the current standalone is using native audio methods.
  32. If this function returns false, you MUST NOT use any other function from this group.
  33. */
  34. bool isUsingNativeAudio() noexcept;
  35. /**
  36. Check if the current standalone supports audio input.
  37. */
  38. bool supportsAudioInput();
  39. /**
  40. Check if the current standalone supports dynamic buffer size changes.
  41. */
  42. bool supportsBufferSizeChanges();
  43. /**
  44. Check if the current standalone supports MIDI.
  45. */
  46. bool supportsMIDI();
  47. /**
  48. Check if the current standalone has audio input enabled.
  49. */
  50. bool isAudioInputEnabled();
  51. /**
  52. Check if the current standalone has MIDI enabled.
  53. */
  54. bool isMIDIEnabled();
  55. /**
  56. Get the current buffer size.
  57. */
  58. uint getBufferSize();
  59. /**
  60. Request permissions to use audio input.
  61. Only valid to call if audio input is supported but not currently enabled.
  62. */
  63. bool requestAudioInput();
  64. /**
  65. Request change to a new buffer size.
  66. */
  67. bool requestBufferSizeChange(uint newBufferSize);
  68. /**
  69. Request permissions to use MIDI.
  70. Only valid to call if MIDI is supported but not currently enabled.
  71. */
  72. bool requestMIDI();
  73. /** @} */
  74. // -----------------------------------------------------------------------------------------------------------
  75. END_NAMESPACE_DISTRHO
  76. #endif // DISTRHO_STANDALONE_UTILS_HPP_INCLUDED