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.

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