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.

186 lines
5.8KB

  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: 5.4.3
  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, unsupported,
  49. versions of Windows will automatically fall back to using the regualar
  50. Win32 MIDI API.
  51. You will need version 10.0.14393.0 of the Windows Standalone SDK to compile
  52. and you may need to add the path to the WinRT headers. The path to the
  53. headers will be something similar to
  54. "C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\winrt".
  55. */
  56. #ifndef JUCE_USE_WINRT_MIDI
  57. #define JUCE_USE_WINRT_MIDI 0
  58. #endif
  59. /** Config: JUCE_ASIO
  60. Enables ASIO audio devices (MS Windows only).
  61. Turning this on means that you'll need to have the Steinberg ASIO SDK installed
  62. on your Windows build machine.
  63. See the comments in the ASIOAudioIODevice class's header file for more
  64. info about this.
  65. */
  66. #ifndef JUCE_ASIO
  67. #define JUCE_ASIO 0
  68. #endif
  69. /** Config: JUCE_WASAPI
  70. Enables WASAPI audio devices (Windows Vista and above). See also the
  71. JUCE_WASAPI_EXCLUSIVE flag.
  72. */
  73. #ifndef JUCE_WASAPI
  74. #define JUCE_WASAPI 1
  75. #endif
  76. /** Config: JUCE_WASAPI_EXCLUSIVE
  77. Enables WASAPI audio devices in exclusive mode (Windows Vista and above).
  78. */
  79. #ifndef JUCE_WASAPI_EXCLUSIVE
  80. #define JUCE_WASAPI_EXCLUSIVE 0
  81. #endif
  82. /** Config: JUCE_DIRECTSOUND
  83. Enables DirectSound audio (MS Windows only).
  84. */
  85. #ifndef JUCE_DIRECTSOUND
  86. #define JUCE_DIRECTSOUND 1
  87. #endif
  88. /** Config: JUCE_ALSA
  89. Enables ALSA audio devices (Linux only).
  90. */
  91. #ifndef JUCE_ALSA
  92. #define JUCE_ALSA 1
  93. #endif
  94. /** Config: JUCE_JACK
  95. Enables JACK audio devices (Linux only).
  96. */
  97. #ifndef JUCE_JACK
  98. #define JUCE_JACK 0
  99. #endif
  100. /** Config: JUCE_BELA
  101. Enables Bela audio devices on Bela boards.
  102. */
  103. #ifndef JUCE_BELA
  104. #define JUCE_BELA 0
  105. #endif
  106. /** Config: JUCE_USE_ANDROID_OBOE
  107. ***
  108. DEVELOPER PREVIEW - Oboe is currently in developer preview and
  109. is in active development. This preview allows for early access
  110. and evaluation for developers targeting Android platform.
  111. ***
  112. Enables Oboe devices (Android only, API 16 or above). Requires
  113. Oboe repository path to be specified in Android exporter.
  114. */
  115. #ifndef JUCE_USE_ANDROID_OBOE
  116. #define JUCE_USE_ANDROID_OBOE 0
  117. #endif
  118. #if JUCE_USE_ANDROID_OBOE && JUCE_ANDROID_API_VERSION < 16
  119. #undef JUCE_USE_ANDROID_OBOE
  120. #define JUCE_USE_ANDROID_OBOE 0
  121. #endif
  122. /** Config: JUCE_USE_ANDROID_OPENSLES
  123. Enables OpenSLES devices (Android only).
  124. */
  125. #ifndef JUCE_USE_ANDROID_OPENSLES
  126. #if ! JUCE_USE_ANDROID_OBOE && JUCE_ANDROID_API_VERSION >= 9
  127. #define JUCE_USE_ANDROID_OPENSLES 1
  128. #else
  129. #define JUCE_USE_ANDROID_OPENSLES 0
  130. #endif
  131. #endif
  132. /** Config: JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  133. Turning this on gives your app exclusive access to the system's audio
  134. on platforms which support it (currently iOS only).
  135. */
  136. #ifndef JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  137. #define JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS 0
  138. #endif
  139. //==============================================================================
  140. #include "midi_io/juce_MidiDevices.h"
  141. #include "midi_io/juce_MidiMessageCollector.h"
  142. #include "audio_io/juce_AudioIODevice.h"
  143. #include "audio_io/juce_AudioIODeviceType.h"
  144. #include "audio_io/juce_SystemAudioVolume.h"
  145. #include "sources/juce_AudioSourcePlayer.h"
  146. #include "sources/juce_AudioTransportSource.h"
  147. #include "audio_io/juce_AudioDeviceManager.h"
  148. #if JUCE_IOS
  149. #include "native/juce_ios_Audio.h"
  150. #endif