115 double sampleRate = 0;
134 bool useDefaultInputChannels =
true;
147 bool useDefaultOutputChannels =
true;
185 String initialise (
int numInputChannelsNeeded,
186 int numOutputChannelsNeeded,
188 bool selectDefaultDeviceOnFailure,
193 String initialiseWithDefaultDevices (
int numInputChannelsNeeded,
194 int numOutputChannelsNeeded);
262 void setCurrentAudioDeviceType (
const String& type,
bool treatAsChosenDevice);
268 void closeAudioDevice();
278 void restartLastAudioDevice();
309 double getCpuUsage()
const;
331 void setMidiInputEnabled (
const String& midiInputDeviceName,
bool enabled);
336 bool isMidiInputEnabled (
const String& midiInputDeviceName)
const;
348 void addMidiInputCallback (
const String& midiInputDeviceName,
352 void removeMidiInputCallback (
const String& midiInputDeviceName,
368 void setDefaultMidiOutput (
const String& deviceName);
406 void playTestSound();
421 double getCurrentLevel()
const noexcept;
429 void updateLevel (
const float*
const*,
int numChannels,
int numSamples) noexcept;
466 int getXRunCount()
const noexcept;
474 std::unique_ptr<AudioIODevice> currentAudioDevice;
476 int numInputChansNeeded = 0, numOutputChansNeeded = 2;
477 String preferredDeviceName, currentDeviceType;
479 std::unique_ptr<XmlElement> lastExplicitSettings;
480 mutable bool listNeedsScanning =
true;
483 struct MidiCallbackInfo
493 String defaultMidiOutputName;
494 std::unique_ptr<MidiOutput> defaultMidiOutput;
497 std::unique_ptr<AudioBuffer<float>> testSound;
498 int testSoundPosition = 0;
507 std::unique_ptr<CallbackHandler> callbackHandler;
509 void audioDeviceIOCallbackInt (
const float** inputChannelData,
int totalNumInputChannels,
510 float** outputChannelData,
int totalNumOutputChannels,
int numSamples);
512 void audioDeviceStoppedInt();
513 void audioDeviceErrorInt (
const String&);
515 void audioDeviceListChanged();
517 String restartDevice (
int blockSizeToUse,
double sampleRateToUse,
523 void createDeviceTypesIfNeeded();
524 void scanDevicesIfNeeded();
525 void deleteCurrentDevice();
526 double chooseBestSampleRate (
double preferred)
const;
527 int chooseBestBufferSize (
int preferred)
const;
530 String initialiseFromXML (
const XmlElement&,
bool selectDefaultDeviceOnFailure,
LevelMeter::Ptr getOutputLevelGetter() noexcept
Returns a reference-counted object that can be used to get the current output level.
One of these is passed to an AudioIODevice object to stream the audio data in and out...
BigInteger outputChannels
The set of active output channels.
#define JUCE_API
This macro is added to all JUCE public class declarations.
Encapsulates a MIDI message.
String getCurrentAudioDeviceType() const
Returns the type of audio device currently in use.
String outputDeviceName
The name of the audio device used for output.
Used to build a tree of elements representing an XML document.
AudioIODevice * getCurrentAudioDevice() const noexcept
Returns the currently-active audio device.
CriticalSection & getMidiCallbackLock() noexcept
Returns the a lock that can be used to synchronise access to the midi callback.
CriticalSection & getAudioCallbackLock() noexcept
Returns the a lock that can be used to synchronise access to the audio callback.
A special array for holding a list of strings.
BigInteger inputChannels
The set of active input channels.
An arbitrarily large integer class.
const String & getDefaultMidiOutputName() const noexcept
Returns the name of the default midi output.
Represents a type of audio driver, such as DirectSound, ASIO, CoreAudio, etc.
Holds a list of ChangeListeners, and sends messages to them when instructed.
String inputDeviceName
The name of the audio device used for input.
Holds a resizable array of primitive or copy-by-value objects.
Base class for an audio device with synchronised input and output channels.
This structure holds a set of properties describing the current audio setup.
Maintains an ongoing measurement of the proportion of time which is being spent inside an audio callb...
Controls a physical MIDI output device.
MidiOutput * getDefaultMidiOutput() const noexcept
Returns the current default midi output device.
An array designed for holding objects.
A base class which provides methods for reference-counting.
A simple reference-counted struct that holds a level-meter value that can be read using getCurrentLev...
Manages the state of some audio and midi i/o devices.
LevelMeter::Ptr getInputLevelGetter() noexcept
Returns a reference-counted object that can be used to get the current input level.