diff options
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r-- | drivers/coreaudio/audio_driver_coreaudio.cpp | 15 | ||||
-rw-r--r-- | drivers/coreaudio/audio_driver_coreaudio.h | 20 |
2 files changed, 12 insertions, 23 deletions
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index 21c3649445..76d2d13dfe 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -676,19 +676,8 @@ String AudioDriverCoreAudio::capture_get_device() { #endif -AudioDriverCoreAudio::AudioDriverCoreAudio() : - audio_unit(nullptr), - input_unit(nullptr), - active(false), - device_name("Default"), - capture_device_name("Default"), - mix_rate(0), - channels(2), - capture_channels(2), - buffer_frames(0) { +AudioDriverCoreAudio::AudioDriverCoreAudio() { samples_in.clear(); } -AudioDriverCoreAudio::~AudioDriverCoreAudio(){}; - -#endif +#endif // COREAUDIO_ENABLED diff --git a/drivers/coreaudio/audio_driver_coreaudio.h b/drivers/coreaudio/audio_driver_coreaudio.h index fb9473e230..89dd52181f 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.h +++ b/drivers/coreaudio/audio_driver_coreaudio.h @@ -42,19 +42,19 @@ class AudioDriverCoreAudio : public AudioDriver { - AudioComponentInstance audio_unit; - AudioComponentInstance input_unit; + AudioComponentInstance audio_unit = nullptr; + AudioComponentInstance input_unit = nullptr; - bool active; + bool active = false; Mutex mutex; - String device_name; - String capture_device_name; + String device_name = "Default"; + String capture_device_name = "Default"; - int mix_rate; - unsigned int channels; - unsigned int capture_channels; - unsigned int buffer_frames; + int mix_rate = 0; + unsigned int channels = 2; + unsigned int capture_channels = 2; + unsigned int buffer_frames = 0; Vector<int32_t> samples_in; Vector<int16_t> input_buf; @@ -118,7 +118,7 @@ public: #endif AudioDriverCoreAudio(); - ~AudioDriverCoreAudio(); + ~AudioDriverCoreAudio() {} }; #endif |