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 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2022 - 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.1.6
  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. minimumCppStandard: 14
  31. dependencies: juce_audio_basics, juce_events
  32. OSXFrameworks: CoreAudio CoreMIDI AudioToolbox
  33. iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation
  34. linuxPackages: alsa
  35. mingwLibs: winmm
  36. END_JUCE_MODULE_DECLARATION
  37. *******************************************************************************/
  38. #pragma once
  39. #define JUCE_AUDIO_DEVICES_H_INCLUDED
  40. #include <juce_events/juce_events.h>
  41. #include <juce_audio_basics/juce_audio_basics.h>
  42. #if JUCE_MODULE_AVAILABLE_juce_graphics
  43. #include <juce_graphics/juce_graphics.h>
  44. #endif
  45. //==============================================================================
  46. /** Config: JUCE_USE_WINRT_MIDI
  47. Enables the use of the Windows Runtime API for MIDI, allowing connections
  48. to Bluetooth Low Energy devices on Windows 10 version 1809 (October 2018
  49. Update) and later. If you enable this flag then older versions of Windows
  50. will automatically fall back to using the regular 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).
  71. */
  72. #ifndef JUCE_WASAPI
  73. #define JUCE_WASAPI 1
  74. #endif
  75. /** Config: JUCE_DIRECTSOUND
  76. Enables DirectSound audio (MS Windows only).
  77. */
  78. #ifndef JUCE_DIRECTSOUND
  79. #define JUCE_DIRECTSOUND 1
  80. #endif
  81. /** Config: JUCE_ALSA
  82. Enables ALSA audio devices (Linux only).
  83. */
  84. #ifndef JUCE_ALSA
  85. #define JUCE_ALSA 1
  86. #endif
  87. /** Config: JUCE_JACK
  88. Enables JACK audio devices (Linux only).
  89. */
  90. #ifndef JUCE_JACK
  91. #define JUCE_JACK 0
  92. #endif
  93. /** Config: JUCE_BELA
  94. Enables Bela audio devices on Bela boards.
  95. */
  96. #ifndef JUCE_BELA
  97. #define JUCE_BELA 0
  98. #endif
  99. /** Config: JUCE_USE_ANDROID_OBOE
  100. Enables Oboe devices (Android only).
  101. */
  102. #ifndef JUCE_USE_ANDROID_OBOE
  103. #define JUCE_USE_ANDROID_OBOE 1
  104. #endif
  105. /** Config: JUCE_USE_OBOE_STABILIZED_CALLBACK
  106. If JUCE_USE_ANDROID_OBOE is enabled, enabling this will wrap output audio
  107. streams in the oboe::StabilizedCallback class. This class attempts to keep
  108. the CPU spinning to avoid it being scaled down on certain devices.
  109. (Android only).
  110. */
  111. #ifndef JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK
  112. #define JUCE_USE_ANDROID_OBOE_STABILIZED_CALLBACK 0
  113. #endif
  114. /** Config: JUCE_USE_ANDROID_OPENSLES
  115. Enables OpenSLES devices (Android only).
  116. */
  117. #ifndef JUCE_USE_ANDROID_OPENSLES
  118. #if ! JUCE_USE_ANDROID_OBOE
  119. #define JUCE_USE_ANDROID_OPENSLES 1
  120. #else
  121. #define JUCE_USE_ANDROID_OPENSLES 0
  122. #endif
  123. #endif
  124. /** Config: JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  125. Turning this on gives your app exclusive access to the system's audio
  126. on platforms which support it (currently iOS only).
  127. */
  128. #ifndef JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS
  129. #define JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS 0
  130. #endif
  131. //==============================================================================
  132. #include "midi_io/juce_MidiDevices.h"
  133. #include "midi_io/juce_MidiMessageCollector.h"
  134. namespace juce
  135. {
  136. /** Available modes for the WASAPI audio device.
  137. Pass one of these to the AudioIODeviceType::createAudioIODeviceType_WASAPI()
  138. method to create a WASAPI AudioIODeviceType object in this mode.
  139. */
  140. enum class WASAPIDeviceMode
  141. {
  142. shared,
  143. exclusive,
  144. sharedLowLatency
  145. };
  146. }
  147. #include "audio_io/juce_AudioIODevice.h"
  148. #include "audio_io/juce_AudioIODeviceType.h"
  149. #include "audio_io/juce_SystemAudioVolume.h"
  150. #include "sources/juce_AudioSourcePlayer.h"
  151. #include "sources/juce_AudioTransportSource.h"
  152. #include "audio_io/juce_AudioDeviceManager.h"
  153. #if JUCE_IOS
  154. #include "native/juce_ios_Audio.h"
  155. #endif