commit f150aab5e67a545824004a49277c82f66c0c4651
Author: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
Date:   Sat Nov 14 14:57:52 2020 +0100

    clang-format-10

diff --git a/server/include/ROS/UtteranceROS.h b/server/include/ROS/UtteranceROS.h
index dbaebb5..8e6c62e 100644
--- a/server/include/ROS/UtteranceROS.h
+++ b/server/include/ROS/UtteranceROS.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "AudioData.h"
@@ -35,75 +35,84 @@ using namespace hlrc_server;
 #include "hlrc_server/utterance.h"
 #include "hlrc_server/ttsAction.h"
 
-//converter from ros utterance
+// converter from ros utterance
 class UtteranceROS : public Utterance {
-    public:
-        UtteranceROS(ttsResultConstPtr ros_utterance){
-            //set text:
-            set_text(ros_utterance->utterance.text);
-
-            //convert soundchunk to audio data:
-            extract_audio_data(ros_utterance->utterance.audio);
-
-            //convert phonemes:
-            extract_phonemes(ros_utterance->utterance.phonemes);
-        }
-
-        ~UtteranceROS(){};
-
-        void extract_audio_data(soundchunk sound_chunk){
-            //extract data:
-            unsigned int audio_len = sound_chunk.data.size();
-            char *audio_data_char = (char *)sound_chunk.data.data();
-
-            audio_data->samples.resize(audio_len);
-            audio_data->samples.assign(audio_data_char, audio_data_char+audio_len);
-            printf("audio samplesize is %d bytes\n",(unsigned int)audio_data->samples.size());
-
-            //extract format:
-            audio_data->sample_signed = true;
-            switch (sound_chunk.sample_type){
-                case(soundchunk::SAMPLE_U8):  audio_data->sample_signed = false; //and fall through:
-                case(soundchunk::SAMPLE_S8):  audio_data->sample_bit =  8; break;
-
-                case(soundchunk::SAMPLE_U16): audio_data->sample_signed = false; //and fall through:
-                case(soundchunk::SAMPLE_S16): audio_data->sample_bit = 16; break;
-
-                case(soundchunk::SAMPLE_U24): audio_data->sample_signed = false; //and fall through:
-                case(soundchunk::SAMPLE_S24): audio_data->sample_bit = 24; break;
-
-                default:
-                    printf("> invalid sample type %d in ROS SoundChunk! ignoring request!\n", sound_chunk.sample_type);
-                    throw runtime_error("UtteranceROS::convert_audio_data() unsupported sample type in ros SoundChunk");
-            }
-
-            //bitrate
-            audio_data->sample_rate = sound_chunk.rate;
-
-            //endianness
-            if (sound_chunk.endianess == soundchunk::ENDIAN_LITTLE){
-                audio_data->sample_big_endian = false;
-            }else if (sound_chunk.endianess == soundchunk::ENDIAN_BIG){
-                audio_data->sample_big_endian = true;
-            }else{
-                printf("> invalid SoundChunk byte_format");
-                throw runtime_error("UtteranceROS::convert_audio_data() unsupported byte_format in ros SoundChunk");
-            }
-
-        //number of channels
-        audio_data->sample_channels = sound_chunk.channels;
-
-        printf("> new AudioData: %s\n",audio_data->to_string().c_str());
-    }
-
-    void extract_phonemes(utterance::_phonemes_type ros_phones){
-        //extract phoneme vector
-        phonemes_vector.clear();
-        for(auto it = ros_phones.begin(); it<ros_phones.end(); it++){
-            Utterance::symbol_duration_pair_t phoneme = make_pair(it->symbol, it->duration);
-            phonemes_vector.push_back(phoneme);
-        }
-    }
-
+public:
+	UtteranceROS(ttsResultConstPtr ros_utterance) {
+		// set text:
+		set_text(ros_utterance->utterance.text);
+
+		// convert soundchunk to audio data:
+		extract_audio_data(ros_utterance->utterance.audio);
+
+		// convert phonemes:
+		extract_phonemes(ros_utterance->utterance.phonemes);
+	}
+
+	~UtteranceROS(){};
+
+	void extract_audio_data(soundchunk sound_chunk) {
+		// extract data:
+		unsigned int audio_len = sound_chunk.data.size();
+		char* audio_data_char = (char*)sound_chunk.data.data();
+
+		audio_data->samples.resize(audio_len);
+		audio_data->samples.assign(audio_data_char, audio_data_char + audio_len);
+		printf("audio samplesize is %d bytes\n", (unsigned int)audio_data->samples.size());
+
+		// extract format:
+		audio_data->sample_signed = true;
+		switch (sound_chunk.sample_type) {
+			case (soundchunk::SAMPLE_U8):
+				audio_data->sample_signed = false; // and fall through:
+			case (soundchunk::SAMPLE_S8):
+				audio_data->sample_bit = 8;
+				break;
+
+			case (soundchunk::SAMPLE_U16):
+				audio_data->sample_signed = false; // and fall through:
+			case (soundchunk::SAMPLE_S16):
+				audio_data->sample_bit = 16;
+				break;
+
+			case (soundchunk::SAMPLE_U24):
+				audio_data->sample_signed = false; // and fall through:
+			case (soundchunk::SAMPLE_S24):
+				audio_data->sample_bit = 24;
+				break;
+
+			default:
+				printf("> invalid sample type %d in ROS SoundChunk! ignoring request!\n", sound_chunk.sample_type);
+				throw runtime_error("UtteranceROS::convert_audio_data() unsupported sample type in ros SoundChunk");
+		}
+
+		// bitrate
+		audio_data->sample_rate = sound_chunk.rate;
+
+		// endianness
+		if (sound_chunk.endianess == soundchunk::ENDIAN_LITTLE) {
+			audio_data->sample_big_endian = false;
+		}
+		else if (sound_chunk.endianess == soundchunk::ENDIAN_BIG) {
+			audio_data->sample_big_endian = true;
+		}
+		else {
+			printf("> invalid SoundChunk byte_format");
+			throw runtime_error("UtteranceROS::convert_audio_data() unsupported byte_format in ros SoundChunk");
+		}
+
+		// number of channels
+		audio_data->sample_channels = sound_chunk.channels;
+
+		printf("> new AudioData: %s\n", audio_data->to_string().c_str());
+	}
+
+	void extract_phonemes(utterance::_phonemes_type ros_phones) {
+		// extract phoneme vector
+		phonemes_vector.clear();
+		for (auto it = ros_phones.begin(); it < ros_phones.end(); it++) {
+			Utterance::symbol_duration_pair_t phoneme = make_pair(it->symbol, it->duration);
+			phonemes_vector.push_back(phoneme);
+		}
+	}
 };
-
