Represents a type of audio driver, such as DirectSound, ASIO, CoreAudio, etc.
More...
#include <juce_AudioIODeviceType.h>
|
class | Listener |
| A class for receiving events when audio devices are inserted or removed. More...
|
|
|
static AudioIODeviceType * | createAudioIODeviceType_CoreAudio () |
| Creates a CoreAudio device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_iOSAudio () |
| Creates an iOS device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_WASAPI (WASAPIDeviceMode deviceMode) |
| Creates a WASAPI device type in the specified mode if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_DirectSound () |
| Creates a DirectSound device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_ASIO () |
| Creates an ASIO device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_ALSA () |
| Creates an ALSA device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_JACK () |
| Creates a JACK device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_Android () |
| Creates an Android device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_OpenSLES () |
| Creates an Android OpenSLES device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_Oboe () |
| Creates an Oboe device type if it's available on this platform, or returns null.
|
|
static AudioIODeviceType * | createAudioIODeviceType_Bela () |
| Creates a Bela device type if it's available on this platform, or returns null.
|
|
Represents a type of audio driver, such as DirectSound, ASIO, CoreAudio, etc.
To get a list of available audio driver types, use the AudioDeviceManager::createAudioDeviceTypes() method. Each of the objects returned can then be used to list the available devices of that type. E.g.
myAudioDeviceManager.createAudioDeviceTypes (types);
for (
int i = 0; i < types.
size(); ++i)
{
types[i]->scanForDevices();
for (int j = 0; j < deviceNames.size(); ++j)
{
AudioIODevice* device = types[i]->createDevice (deviceNames [j]);
...
}
}
const String & getTypeName() const noexcept
Returns the name of this type of driver that this object manages.
Definition juce_AudioIODeviceType.h:84
virtual StringArray getDeviceNames(bool wantInputNames=false) const =0
Returns the list of available devices of this type.
Base class for an audio device with synchronised input and output channels.
Definition juce_AudioIODevice.h:166
An array designed for holding objects.
Definition juce_OwnedArray.h:65
int size() const noexcept
Returns the number of items currently in the array.
Definition juce_OwnedArray.h:144
A special array for holding a list of strings.
Definition juce_StringArray.h:50
The JUCE String class!
Definition juce_String.h:68
For an easier way of managing audio devices and their settings, have a look at the AudioDeviceManager class.
- See also
- AudioIODevice, AudioDeviceManager
◆ ~AudioIODeviceType()
virtual AudioIODeviceType::~AudioIODeviceType |
( |
| ) |
|
|
virtual |
◆ AudioIODeviceType()
AudioIODeviceType::AudioIODeviceType |
( |
const String & | typeName | ) |
|
|
explicitprotected |
◆ getTypeName()
const String & AudioIODeviceType::getTypeName |
( |
| ) |
const |
|
noexcept |
Returns the name of this type of driver that this object manages.
This will be something like "DirectSound", "ASIO", "CoreAudio", "ALSA", etc.
◆ scanForDevices()
virtual void AudioIODeviceType::scanForDevices |
( |
| ) |
|
|
pure virtual |
Refreshes the object's cached list of known devices.
This must be called at least once before calling getDeviceNames() or any of the other device creation methods.
◆ getDeviceNames()
virtual StringArray AudioIODeviceType::getDeviceNames |
( |
bool | wantInputNames = false | ) |
const |
|
pure virtual |
Returns the list of available devices of this type.
The scanForDevices() method must have been called to create this list.
- Parameters
-
wantInputNames | for devices which have separate inputs and outputs this determines which list of names is returned |
◆ getDefaultDeviceIndex()
virtual int AudioIODeviceType::getDefaultDeviceIndex |
( |
bool | forInput | ) |
const |
|
pure virtual |
Returns the name of the default device.
This will be one of the names from the getDeviceNames() list.
- Parameters
-
forInput | if true, this means that a default input device should be returned; if false, it should return the default output |
◆ getIndexOfDevice()
virtual int AudioIODeviceType::getIndexOfDevice |
( |
AudioIODevice * | device, |
|
|
bool | asInput ) const |
|
pure virtual |
Returns the index of a given device in the list of device names.
If asInput is true, it shows the index in the inputs list, otherwise it looks for it in the outputs list.
◆ hasSeparateInputsAndOutputs()
virtual bool AudioIODeviceType::hasSeparateInputsAndOutputs |
( |
| ) |
const |
|
pure virtual |
Returns true if two different devices can be used for the input and output.
◆ createDevice()
Creates one of the devices of this type.
The deviceName must be one of the strings returned by getDeviceNames(), and scanForDevices() must have been called before this method is used.
◆ addListener()
void AudioIODeviceType::addListener |
( |
Listener * | listener | ) |
|
Adds a listener that will be called when this type of device is added or removed from the system.
◆ removeListener()
void AudioIODeviceType::removeListener |
( |
Listener * | listener | ) |
|
◆ createAudioIODeviceType_CoreAudio()
Creates a CoreAudio device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_iOSAudio()
Creates an iOS device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_WASAPI()
static AudioIODeviceType * AudioIODeviceType::createAudioIODeviceType_WASAPI |
( |
WASAPIDeviceMode | deviceMode | ) |
|
|
static |
Creates a WASAPI device type in the specified mode if it's available on this platform, or returns null.
◆ createAudioIODeviceType_DirectSound()
static AudioIODeviceType * AudioIODeviceType::createAudioIODeviceType_DirectSound |
( |
| ) |
|
|
static |
Creates a DirectSound device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_ASIO()
Creates an ASIO device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_ALSA()
Creates an ALSA device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_JACK()
Creates a JACK device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_Android()
Creates an Android device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_OpenSLES()
Creates an Android OpenSLES device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_Oboe()
Creates an Oboe device type if it's available on this platform, or returns null.
◆ createAudioIODeviceType_Bela()
Creates a Bela device type if it's available on this platform, or returns null.
◆ callDeviceChangeListeners()
void AudioIODeviceType::callDeviceChangeListeners |
( |
| ) |
|
|
protected |
Synchronously calls all the registered device list change listeners.
The documentation for this class was generated from the following file: