OpenShot Audio Library | OpenShotAudio: juce_AudioIODeviceType.h Source File

OpenShot Audio Library | OpenShotAudio 1.0.0

Loading...
Searching...
No Matches
juce_AudioIODeviceType.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
61 class JUCE_API AudioIODeviceType
62{
63public:
64 //==============================================================================
69 const String& getTypeName() const noexcept { return typeName; }
70
71 //==============================================================================
77 virtual void scanForDevices() = 0;
78
86 virtual StringArray getDeviceNames (bool wantInputNames = false) const = 0;
87
95 virtual int getDefaultDeviceIndex (bool forInput) const = 0;
96
101 virtual int getIndexOfDevice (AudioIODevice* device, bool asInput) const = 0;
102
105 virtual bool hasSeparateInputsAndOutputs() const = 0;
106
112 virtual AudioIODevice* createDevice (const String& outputDeviceName,
113 const String& inputDeviceName) = 0;
114
115 //==============================================================================
125 class Listener
126 {
127 public:
128 virtual ~Listener() = default;
129
131 virtual void audioDeviceListChanged() = 0;
132 };
133
137 void addListener (Listener* listener);
138
140 void removeListener (Listener* listener);
141
142 //==============================================================================
144 virtual ~AudioIODeviceType();
145
146 //==============================================================================
148 static AudioIODeviceType* createAudioIODeviceType_CoreAudio();
150 static AudioIODeviceType* createAudioIODeviceType_iOSAudio();
152 static AudioIODeviceType* createAudioIODeviceType_WASAPI (WASAPIDeviceMode deviceMode);
154 static AudioIODeviceType* createAudioIODeviceType_DirectSound();
156 static AudioIODeviceType* createAudioIODeviceType_ASIO();
158 static AudioIODeviceType* createAudioIODeviceType_ALSA();
160 static AudioIODeviceType* createAudioIODeviceType_JACK();
162 static AudioIODeviceType* createAudioIODeviceType_Android();
164 static AudioIODeviceType* createAudioIODeviceType_OpenSLES();
166 static AudioIODeviceType* createAudioIODeviceType_Oboe();
168 static AudioIODeviceType* createAudioIODeviceType_Bela();
169
170 #ifndef DOXYGEN
171 [[deprecated ("You should call the method which takes a WASAPIDeviceMode instead.")]]
172 static AudioIODeviceType* createAudioIODeviceType_WASAPI (bool exclusiveMode);
173 #endif
174
175protected:
176 explicit AudioIODeviceType (const String& typeName);
177
179 void callDeviceChangeListeners();
180
181private:
182 String typeName;
183 ListenerList<Listener> listeners;
184
185 JUCE_DECLARE_NON_COPYABLE (AudioIODeviceType)
186};
187
188} // namespace juce
juce::AudioIODeviceType::Listener
Definition juce_AudioIODeviceType.h:126
juce::AudioIODeviceType::Listener::audioDeviceListChanged
virtual void audioDeviceListChanged()=0
juce::AudioIODeviceType::createAudioIODeviceType_WASAPI
static AudioIODeviceType * createAudioIODeviceType_WASAPI(WASAPIDeviceMode deviceMode)
Definition juce_AudioIODeviceType.cpp:75
juce::AudioIODeviceType::getDefaultDeviceIndex
virtual int getDefaultDeviceIndex(bool forInput) const =0
juce::AudioIODeviceType::createAudioIODeviceType_ASIO
static AudioIODeviceType * createAudioIODeviceType_ASIO()
Definition juce_AudioIODeviceType.cpp:88
juce::AudioIODeviceType::createAudioIODeviceType_Oboe
static AudioIODeviceType * createAudioIODeviceType_Oboe()
Definition juce_AudioIODeviceType.cpp:143
juce::AudioIODeviceType::createAudioIODeviceType_JACK
static AudioIODeviceType * createAudioIODeviceType_JACK()
Definition juce_AudioIODeviceType.cpp:100
juce::AudioIODeviceType::createAudioIODeviceType_DirectSound
static AudioIODeviceType * createAudioIODeviceType_DirectSound()
Definition juce_AudioIODeviceType.cpp:82
juce::AudioIODeviceType::removeListener
void removeListener(Listener *listener)
Definition juce_AudioIODeviceType.cpp:37
juce::AudioIODeviceType::createAudioIODeviceType_Android
static AudioIODeviceType * createAudioIODeviceType_Android()
Definition juce_AudioIODeviceType.cpp:125
juce::AudioIODeviceType::createAudioIODeviceType_OpenSLES
static AudioIODeviceType * createAudioIODeviceType_OpenSLES()
Definition juce_AudioIODeviceType.cpp:134
juce::AudioIODeviceType::createAudioIODeviceType_CoreAudio
static AudioIODeviceType * createAudioIODeviceType_CoreAudio()
Definition juce_AudioIODeviceType.cpp:48
juce::AudioIODeviceType::hasSeparateInputsAndOutputs
virtual bool hasSeparateInputsAndOutputs() const =0
juce::AudioIODeviceType::getDeviceNames
virtual StringArray getDeviceNames(bool wantInputNames=false) const =0
juce::AudioIODeviceType::callDeviceChangeListeners
void callDeviceChangeListeners()
Definition juce_AudioIODeviceType.cpp:39
juce::AudioIODeviceType::scanForDevices
virtual void scanForDevices()=0
juce::AudioIODeviceType::getIndexOfDevice
virtual int getIndexOfDevice(AudioIODevice *device, bool asInput) const =0
juce::AudioIODeviceType::getTypeName
const String & getTypeName() const noexcept
Definition juce_AudioIODeviceType.h:69
juce::AudioIODeviceType::createAudioIODeviceType_Bela
static AudioIODeviceType * createAudioIODeviceType_Bela()
Definition juce_AudioIODeviceType.cpp:106
juce::AudioIODeviceType::addListener
void addListener(Listener *listener)
Definition juce_AudioIODeviceType.cpp:36
juce::AudioIODeviceType::createAudioIODeviceType_ALSA
static AudioIODeviceType * createAudioIODeviceType_ALSA()
Definition juce_AudioIODeviceType.cpp:94
juce::AudioIODeviceType::createDevice
virtual AudioIODevice * createDevice(const String &outputDeviceName, const String &inputDeviceName)=0
juce::AudioIODeviceType::createAudioIODeviceType_iOSAudio
static AudioIODeviceType * createAudioIODeviceType_iOSAudio()
Definition juce_AudioIODeviceType.cpp:54
juce::AudioIODevice
Definition juce_AudioIODevice.h:151
juce::ListenerList
Definition juce_ListenerList.h:81
juce::StringArray
Definition juce_StringArray.h:35
juce::String
Definition juce_String.h:53