diff options
Diffstat (limited to 'drivers/alsa')
-rw-r--r-- | drivers/alsa/audio_driver_alsa.cpp | 12 | ||||
-rw-r--r-- | drivers/alsa/audio_driver_alsa.h | 12 |
2 files changed, 7 insertions, 17 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index 48e694dd3a..e394222d3a 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -331,14 +331,4 @@ void AudioDriverALSA::finish() { finish_device(); } -AudioDriverALSA::AudioDriverALSA() : - thread(nullptr), - pcm_handle(nullptr), - device_name("Default"), - new_device("Default") { -} - -AudioDriverALSA::~AudioDriverALSA() { -} - -#endif +#endif // ALSA_ENABLED diff --git a/drivers/alsa/audio_driver_alsa.h b/drivers/alsa/audio_driver_alsa.h index 50bd9e853d..d437993901 100644 --- a/drivers/alsa/audio_driver_alsa.h +++ b/drivers/alsa/audio_driver_alsa.h @@ -41,13 +41,13 @@ class AudioDriverALSA : public AudioDriver { - Thread *thread; + Thread *thread = nullptr; Mutex mutex; - snd_pcm_t *pcm_handle; + snd_pcm_t *pcm_handle = nullptr; - String device_name; - String new_device; + String device_name = "Default"; + String new_device = "Default"; Vector<int32_t> samples_in; Vector<int16_t> samples_out; @@ -85,8 +85,8 @@ public: virtual void unlock(); virtual void finish(); - AudioDriverALSA(); - ~AudioDriverALSA(); + AudioDriverALSA() {} + ~AudioDriverALSA() {} }; #endif // AUDIO_DRIVER_ALSA_H |