111 double sampleRate = 0;
130 bool useDefaultInputChannels =
true;
143 bool useDefaultOutputChannels =
true;
181 String initialise (
int numInputChannelsNeeded,
182 int numOutputChannelsNeeded,
184 bool selectDefaultDeviceOnFailure,
189 String initialiseWithDefaultDevices (
int numInputChannelsNeeded,
190 int numOutputChannelsNeeded);
200 std::unique_ptr<XmlElement> createStateXml()
const;
258 void setCurrentAudioDeviceType (
const String& type,
bool treatAsChosenDevice);
264 void closeAudioDevice();
274 void restartLastAudioDevice();
305 double getCpuUsage()
const;
327 void setMidiInputDeviceEnabled (
const String& deviceIdentifier,
bool enabled);
333 bool isMidiInputDeviceEnabled (
const String& deviceIdentifier)
const;
345 void addMidiInputDeviceCallback (
const String& deviceIdentifier,
349 void removeMidiInputDeviceCallback (
const String& deviceIdentifier,
365 void setDefaultMidiOutputDevice (
const String& deviceIdentifier);
395 void addAudioDeviceType (std::unique_ptr<AudioIODeviceType> newDeviceType);
406 void playTestSound();
421 double getCurrentLevel()
const noexcept;
429 void updateLevel (
const float*
const*,
int numChannels,
int numSamples) noexcept;
466 int getXRunCount()
const noexcept;
470 void setMidiInputEnabled (
const String&,
bool);
472 bool isMidiInputEnabled (
const String&)
const;
478 void setDefaultMidiOutput (
const String&);
488 std::unique_ptr<AudioIODevice> currentAudioDevice;
490 int numInputChansNeeded = 0, numOutputChansNeeded = 2;
491 String preferredDeviceName, currentDeviceType;
492 std::unique_ptr<XmlElement> lastExplicitSettings;
493 mutable bool listNeedsScanning =
true;
496 struct MidiCallbackInfo
503 std::vector<std::unique_ptr<MidiInput>> enabledMidiInputs;
507 std::unique_ptr<MidiOutput> defaultMidiOutput;
510 std::unique_ptr<AudioBuffer<float>> testSound;
511 int testSoundPosition = 0;
519 class CallbackHandler;
520 std::unique_ptr<CallbackHandler> callbackHandler;
522 void audioDeviceIOCallbackInt (
const float** inputChannelData,
int totalNumInputChannels,
523 float** outputChannelData,
int totalNumOutputChannels,
int numSamples);
525 void audioDeviceStoppedInt();
526 void audioDeviceErrorInt (
const String&);
528 void audioDeviceListChanged();
530 String restartDevice (
int blockSizeToUse,
double sampleRateToUse,
536 void createDeviceTypesIfNeeded();
537 void scanDevicesIfNeeded();
538 void deleteCurrentDevice();
539 double chooseBestSampleRate (
double preferred)
const;
540 int chooseBestBufferSize (
int preferred)
const;
543 String initialiseFromXML (
const XmlElement&,
bool selectDefaultDeviceOnFailure,
LevelMeter::Ptr getOutputLevelGetter() noexcept
BigInteger outputChannels
String getCurrentAudioDeviceType() const
AudioIODevice * getCurrentAudioDevice() const noexcept
CriticalSection & getMidiCallbackLock() noexcept
CriticalSection & getAudioCallbackLock() noexcept
const String & getDefaultMidiOutputName() const noexcept
const String & getDefaultMidiOutputIdentifier() const noexcept
MidiOutput * getDefaultMidiOutput() const noexcept
LevelMeter::Ptr getInputLevelGetter() noexcept