#pragma once #include "cxx_juce_audio_callback_wrapper.h" #include "cxx_juce_audio_device_setup.h" #include #include namespace cxx_juce { struct BoxedAudioIODeviceType; struct AudioDeviceManager { void initialiseWithDefaultDevices (rust::i32 inputChannels, rust::i32 outputChannels); [[nodiscard]] std::unique_ptr getAudioDeviceSetup() const; void setAudioDeviceSetup (const AudioDeviceSetup& setup); void addAudioCallback (const std::unique_ptr& callback); void removeAudioCallback (const std::unique_ptr& callback); void addAudioDeviceType (rust::Box audioIODeviceType); void setCurrentAudioDeviceType (rust::Str audioDeviceTypeName); void playTestSound(); juce::AudioIODevice* getCurrentAudioDevice() const; const juce::OwnedArray& getAvailableDeviceTypes(); juce::AudioIODeviceType* getCurrentDeviceTypeObject() const; juce::AudioDeviceManager _audioDeviceManager; }; std::unique_ptr createAudioDeviceManager(); } // namespace cxx_juce