Merge "Cleanup CreateAudioPlayer and CreateMediaPlayer"
diff --git a/src/android/AudioPlayer_to_android.cpp b/src/android/AudioPlayer_to_android.cpp
index b2d39e0..2b47b70 100644
--- a/src/android/AudioPlayer_to_android.cpp
+++ b/src/android/AudioPlayer_to_android.cpp
@@ -1297,7 +1297,7 @@
     SLresult result;
 
     assert(NULL != ap && NULL != configKey && NULL != pConfigValue);
-    if(strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_STREAM_TYPE) == 0) {
+    if (strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_STREAM_TYPE) == 0) {
 
         // stream type
         if (KEY_STREAM_TYPE_PARAMSIZE > valueSize) {
@@ -1323,7 +1323,7 @@
     SLresult result;
 
     assert(NULL != ap && NULL != configKey && NULL != pValueSize);
-    if(strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_STREAM_TYPE) == 0) {
+    if (strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_STREAM_TYPE) == 0) {
 
         // stream type
         if (NULL == pConfigValue) {
diff --git a/src/android/AudioRecorder_to_android.cpp b/src/android/AudioRecorder_to_android.cpp
index 497bed2..0012fa9 100644
--- a/src/android/AudioRecorder_to_android.cpp
+++ b/src/android/AudioRecorder_to_android.cpp
@@ -328,7 +328,7 @@
     SLresult result;
 
     assert(NULL != ar && NULL != configKey && NULL != pConfigValue);
-    if(strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_RECORDING_PRESET) == 0) {
+    if (strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_RECORDING_PRESET) == 0) {
 
         // recording preset
         if (KEY_RECORDING_PRESET_PARAMSIZE > valueSize) {
@@ -354,7 +354,7 @@
     SLresult result;
 
     assert(NULL != ar && NULL != configKey && NULL != pValueSize);
-    if(strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_RECORDING_PRESET) == 0) {
+    if (strcmp((const char*)configKey, (const char*)SL_ANDROID_KEY_RECORDING_PRESET) == 0) {
 
         // recording preset
         if (NULL == pConfigValue) {
diff --git a/src/android/android_AudioSfDecoder.cpp b/src/android/android_AudioSfDecoder.cpp
index a29f09f..5908189 100644
--- a/src/android/android_AudioSfDecoder.cpp
+++ b/src/android/android_AudioSfDecoder.cpp
@@ -488,7 +488,7 @@
             mDecodeBuffer->release();
             mDecodeBuffer = NULL;
         }
-        if(!mAudioSourceStarted) {
+        if (!mAudioSourceStarted) {
             return;
         }
         err = mAudioSource->read(&mDecodeBuffer, &readOptions);
diff --git a/src/android/android_GenericPlayer.cpp b/src/android/android_GenericPlayer.cpp
index 219c856..0fd975c 100644
--- a/src/android/android_GenericPlayer.cpp
+++ b/src/android/android_GenericPlayer.cpp
@@ -279,7 +279,7 @@
     if (async) {
         msg->post();
     } else {
-        this->onNotify(msg);
+        onNotify(msg);
     }
 }
 
@@ -292,7 +292,7 @@
     if (async) {
         msg->post();
     } else {
-        this->onNotify(msg);
+        onNotify(msg);
     }
 }
 
diff --git a/src/itf/IPlay.c b/src/itf/IPlay.c
index 458ea30..8e44463 100644
--- a/src/itf/IPlay.c
+++ b/src/itf/IPlay.c
@@ -395,8 +395,9 @@
                 CAudioPlayer *audioPlayer = (CAudioPlayer *) thiz->mThis;
                 SLuint32 frameUpdatePeriod = ((long long) mSec *
                     (long long) audioPlayer->mSampleRateMilliHz) / 1000000LL;
-                if (0 == frameUpdatePeriod)
+                if (0 == frameUpdatePeriod) {
                     frameUpdatePeriod = ~0;
+                }
                 thiz->mFrameUpdatePeriod = frameUpdatePeriod;
                 // setting a new update period postpones the next callback
                 thiz->mFramesSincePositionUpdate = 0;
diff --git a/src/itf/IVolume.c b/src/itf/IVolume.c
index 52f4da4..aaef4a9 100644
--- a/src/itf/IVolume.c
+++ b/src/itf/IVolume.c
@@ -32,8 +32,9 @@
         if (oldLevel != level) {
             thiz->mLevel = level;
             interface_unlock_exclusive_attributes(thiz, ATTR_GAIN);
-        } else
+        } else {
             interface_unlock_exclusive(thiz);
+        }
         result = SL_RESULT_SUCCESS;
     }
 
@@ -86,8 +87,9 @@
     if (oldMute != mute) {
         thiz->mMute = (SLuint8) mute;
         interface_unlock_exclusive_attributes(thiz, ATTR_GAIN);
-    } else
+    } else {
         interface_unlock_exclusive(thiz);
+    }
     result = SL_RESULT_SUCCESS;
 
     SL_LEAVE_INTERFACE
@@ -165,8 +167,9 @@
         if (oldStereoPosition != stereoPosition) {
             thiz->mStereoPosition = stereoPosition;
             interface_unlock_exclusive_attributes(thiz, ATTR_GAIN);
-        } else
+        } else {
             interface_unlock_exclusive(thiz);
+        }
         result = SL_RESULT_SUCCESS;
     }
 
diff --git a/src/sles.c b/src/sles.c
index 270d01a..5c4d3eb 100644
--- a/src/sles.c
+++ b/src/sles.c
@@ -58,8 +58,9 @@
     const ClassTable *clazz = thiz->mClass;
     assert(NULL != clazz);
     SLuint32 id = clazz->mSLObjectID;
-    if (!id)
+    if (!id) {
         id = clazz->mXAObjectID;
+    }
     return id;
 }