summaryrefslogtreecommitdiff
path: root/drivers/alsa
diff options
context:
space:
mode:
authorWilson E. Alvarez <wilson.e.alvarez1@gmail.com>2018-12-08 15:07:33 -0500
committerWilson E. Alvarez <wilson.e.alvarez1@gmail.com>2018-12-11 18:33:01 -0500
commit08f22f1cf0e0d133b7ea763dc3886cf462c6fcb2 (patch)
tree5f4321fb0e3150ca159598b6badcf1a90d1fdcd6 /drivers/alsa
parent41d1dba35fc851258d5aabad819d09f6a43e324c (diff)
Moved member variables to initializer list
Diffstat (limited to 'drivers/alsa')
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp37
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp
index 50697b8834..2e3861f500 100644
--- a/drivers/alsa/audio_driver_alsa.cpp
+++ b/drivers/alsa/audio_driver_alsa.cpp
@@ -159,7 +159,7 @@ Error AudioDriverALSA::init() {
}
return err;
-};
+}
void AudioDriverALSA::thread_func(void *p_udata) {
@@ -232,25 +232,25 @@ void AudioDriverALSA::thread_func(void *p_udata) {
ad->stop_counting_ticks();
ad->unlock();
- };
+ }
ad->thread_exited = true;
-};
+}
void AudioDriverALSA::start() {
active = true;
-};
+}
int AudioDriverALSA::get_mix_rate() const {
return mix_rate;
-};
+}
AudioDriver::SpeakerMode AudioDriverALSA::get_speaker_mode() const {
return speaker_mode;
-};
+}
Array AudioDriverALSA::get_device_list() {
@@ -302,14 +302,14 @@ void AudioDriverALSA::lock() {
if (!thread || !mutex)
return;
mutex->lock();
-};
+}
void AudioDriverALSA::unlock() {
if (!thread || !mutex)
return;
mutex->unlock();
-};
+}
void AudioDriverALSA::finish_device() {
@@ -337,18 +337,15 @@ void AudioDriverALSA::finish() {
finish_device();
}
-AudioDriverALSA::AudioDriverALSA() {
-
- mutex = NULL;
- thread = NULL;
- pcm_handle = NULL;
-
- device_name = "Default";
- new_device = "Default";
-};
-
-AudioDriverALSA::~AudioDriverALSA(){
+AudioDriverALSA::AudioDriverALSA() :
+ thread(NULL),
+ mutex(NULL),
+ pcm_handle(NULL),
+ device_name("Default"),
+ new_device("Default") {
+}
-};
+AudioDriverALSA::~AudioDriverALSA() {
+}
#endif