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.

juce_audio_devices.h 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2020 - Raw Material Software Limited
  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.md file.
  22. BEGIN_JUCE_MODULE_DECLARATION
  23. ID: juce_audio_devices
  24. vendor: juce
  25. version: 6.0.4
  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).
  70. */
  71. #ifndef JUCE_WASAPI
  72. #define JUCE_WASAPI 1
  73. #endif
  74. /** Config: JUCE_DIRECTSOUND
  75. Enables DirectSound audio (MS Windows only).
  76. */
  77. #ifndef JUCE_DIRECTSOUND
  78. #define JUCE_DIRECTSOUND 1
  79. #endif
  80. /** Config: JUCE_ALSA
  81. Enables ALSA audio devices (Linux only).
  82. */
  83. #ifndef JUCE_ALSA
  84. #define JUCE_ALSA 1
  85. #endif
  86. /** Config: JUCE_JACK
  87. Enables JACK audio devices (Linux only).
  88. */
  89. #ifndef JUCE_JACK
  90. #define JUCE_JACK 0
  91. #endif
  92. /** Config: JUCE_BELA
  93. Enables Bela audio devices on Bela boards.
  94. */
  95. #ifndef JUCE_BELA
  96. #define JUCE_BELA 0
  97. #endif
  98. /** Config: JUCE_USE_ANDROID_OBOE
  99. Enables Oboe devices (Android only, API 16 or above).
  100. */
  101. #ifndef JUCE_USE_ANDROID_OBOE
  102. #define JUCE_USE_ANDROID_OBOE 1
  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_OBOE_STABILIZED_CALLBACK
  109. If JUCE_USE_ANDROID_OBOE is enabled, enabling this will wrap output audio
  110. streams in the oboe::StabilizedCallback class. This class attempts to keep
  111. the CPU spinning to avoid it being scaled down on certain devices.
  112. */
  113. #ifndef JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK
  114. #define JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK 0
  115. #endif
  116. /** Config: JUCE_USE_ANDROID_OPENSLES
  117. Enables OpenSLES devices (Android only).
  118. */
  119. #ifndef JUCE_USE_ANDROID_OPENSLES
  120. #if ! JUCE_USE_ANDROID_OBOE && JUCE_ANDROID_API_VERSION >= 9
  121. #define JUCE_USE_ANDROID_OPENSLES 1
  122. #else
  123. #define JUCE_USE_ANDROID_OPENSLES 0
  124. #endif
  125. #endif
  126. /** Config: JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  127. Turning this on gives your app exclusive access to the system's audio
  128. on platforms which support it (currently iOS only).
  129. */
  130. #ifndef JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  131. #define JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS 0
  132. #endif
  133. //==============================================================================
  134. #include "midi_io/juce_MidiDevices.h"
  135. #include "midi_io/juce_MidiMessageCollector.h"
  136. namespace juce
  137. {
  138. /** Available modes for the WASAPI audio device.
  139. Pass one of these to the AudioIODeviceType::createAudioIODeviceType_WASAPI()
  140. method to create a WASAPI AudioIODeviceType object in this mode.
  141. */
  142. enum class WASAPIDeviceMode
  143. {
  144. shared,
  145. exclusive,
  146. sharedLowLatency
  147. };
  148. }
  149. #include "audio_io/juce_AudioIODevice.h"
  150. #include "audio_io/juce_AudioIODeviceType.h"
  151. #include "audio_io/juce_SystemAudioVolume.h"
  152. #include "sources/juce_AudioSourcePlayer.h"
  153. #include "sources/juce_AudioTransportSource.h"
  154. #include "audio_io/juce_AudioDeviceManager.h"
  155. #if JUCE_IOS
  156. #include "native/juce_ios_Audio.h"
  157. #endif