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.

187 lines
5.9KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. The code included in this file is provided under the terms of the ISC license
  8. http://www.isc.org/downloads/software-support-policy/isc-license. Permission
  9. To use, copy, modify, and/or distribute this software for any purpose with or
  10. without fee is hereby granted provided that the above copyright notice and
  11. this permission notice appear in all copies.
  12. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  13. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  14. DISCLAIMED.
  15. ==============================================================================
  16. */
  17. /*******************************************************************************
  18. The block below describes the properties of this module, and is read by
  19. the Projucer to automatically generate project code that uses it.
  20. For details about the syntax and how to create or use a module, see the
  21. JUCE Module Format.txt file.
  22. BEGIN_JUCE_MODULE_DECLARATION
  23. ID: juce_audio_devices
  24. vendor: juce
  25. version: 6.0.0
  26. name: JUCE audio and MIDI I/O device classes
  27. description: Classes to play and record from audio and MIDI I/O devices
  28. website: http://www.juce.com/juce
  29. license: ISC
  30. dependencies: juce_audio_basics, juce_events
  31. OSXFrameworks: CoreAudio CoreMIDI AudioToolbox
  32. iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation
  33. linuxPackages: alsa
  34. mingwLibs: winmm
  35. END_JUCE_MODULE_DECLARATION
  36. *******************************************************************************/
  37. #pragma once
  38. #define JUCE_AUDIO_DEVICES_H_INCLUDED
  39. #include <juce_events/juce_events.h>
  40. #include <juce_audio_basics/juce_audio_basics.h>
  41. #if JUCE_MODULE_AVAILABLE_juce_graphics
  42. #include <juce_graphics/juce_graphics.h>
  43. #endif
  44. //==============================================================================
  45. /** Config: JUCE_USE_WINRT_MIDI
  46. Enables the use of the Windows Runtime API for MIDI, allowing connections
  47. to Bluetooth Low Energy devices on Windows 10 version 1809 (October 2018
  48. Update) and later. If you enable this flag then older versions of Windows
  49. will automatically fall back to using the regular Win32 MIDI API.
  50. You will need version 10.0.14393.0 of the Windows Standalone SDK to compile
  51. and you may need to add the path to the WinRT headers. The path to the
  52. headers will be something similar to
  53. "C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\winrt".
  54. */
  55. #ifndef JUCE_USE_WINRT_MIDI
  56. #define JUCE_USE_WINRT_MIDI 0
  57. #endif
  58. /** Config: JUCE_ASIO
  59. Enables ASIO audio devices (MS Windows only).
  60. Turning this on means that you'll need to have the Steinberg ASIO SDK installed
  61. on your Windows build machine.
  62. See the comments in the ASIOAudioIODevice class's header file for more
  63. info about this.
  64. */
  65. #ifndef JUCE_ASIO
  66. #define JUCE_ASIO 0
  67. #endif
  68. /** Config: JUCE_WASAPI
  69. Enables WASAPI audio devices (Windows Vista and above). See also the
  70. JUCE_WASAPI_EXCLUSIVE flag.
  71. */
  72. #ifndef JUCE_WASAPI
  73. #define JUCE_WASAPI 1
  74. #endif
  75. /** Config: JUCE_WASAPI_EXCLUSIVE
  76. Enables WASAPI audio devices in exclusive mode (Windows Vista and above).
  77. */
  78. #ifndef JUCE_WASAPI_EXCLUSIVE
  79. #define JUCE_WASAPI_EXCLUSIVE 0
  80. #endif
  81. /** Config: JUCE_DIRECTSOUND
  82. Enables DirectSound audio (MS Windows only).
  83. */
  84. #ifndef JUCE_DIRECTSOUND
  85. #define JUCE_DIRECTSOUND 1
  86. #endif
  87. /** Config: JUCE_ALSA
  88. Enables ALSA audio devices (Linux only).
  89. */
  90. #ifndef JUCE_ALSA
  91. #define JUCE_ALSA 1
  92. #endif
  93. /** Config: JUCE_JACK
  94. Enables JACK audio devices (Linux only).
  95. */
  96. #ifndef JUCE_JACK
  97. #define JUCE_JACK 0
  98. #endif
  99. /** Config: JUCE_BELA
  100. Enables Bela audio devices on Bela boards.
  101. */
  102. #ifndef JUCE_BELA
  103. #define JUCE_BELA 0
  104. #endif
  105. /** Config: JUCE_USE_ANDROID_OBOE
  106. Enables Oboe devices (Android only, API 16 or above).
  107. */
  108. #ifndef JUCE_USE_ANDROID_OBOE
  109. #define JUCE_USE_ANDROID_OBOE 1
  110. #endif
  111. #if JUCE_USE_ANDROID_OBOE && JUCE_ANDROID_API_VERSION < 16
  112. #undef JUCE_USE_ANDROID_OBOE
  113. #define JUCE_USE_ANDROID_OBOE 0
  114. #endif
  115. /** Config: JUCE_USE_OBOE_STABILIZED_CALLBACK
  116. If JUCE_USE_ANDROID_OBOE is enabled, enabling this will wrap output audio
  117. streams in the oboe::StabilizedCallback class. This class attempts to keep
  118. the CPU spinning to avoid it being scaled down on certain devices.
  119. */
  120. #ifndef JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK
  121. #define JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK 0
  122. #endif
  123. /** Config: JUCE_USE_ANDROID_OPENSLES
  124. Enables OpenSLES devices (Android only).
  125. */
  126. #ifndef JUCE_USE_ANDROID_OPENSLES
  127. #if ! JUCE_USE_ANDROID_OBOE && JUCE_ANDROID_API_VERSION >= 9
  128. #define JUCE_USE_ANDROID_OPENSLES 1
  129. #else
  130. #define JUCE_USE_ANDROID_OPENSLES 0
  131. #endif
  132. #endif
  133. /** Config: JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  134. Turning this on gives your app exclusive access to the system's audio
  135. on platforms which support it (currently iOS only).
  136. */
  137. #ifndef JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  138. #define JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS 0
  139. #endif
  140. //==============================================================================
  141. #include "midi_io/juce_MidiDevices.h"
  142. #include "midi_io/juce_MidiMessageCollector.h"
  143. #include "audio_io/juce_AudioIODevice.h"
  144. #include "audio_io/juce_AudioIODeviceType.h"
  145. #include "audio_io/juce_SystemAudioVolume.h"
  146. #include "sources/juce_AudioSourcePlayer.h"
  147. #include "sources/juce_AudioTransportSource.h"
  148. #include "audio_io/juce_AudioDeviceManager.h"
  149. #if JUCE_IOS
  150. #include "native/juce_ios_Audio.h"
  151. #endif