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/src/Utterance.cpp b/server/src/Utterance.cpp
index 7dc945c..b16d949 100644
--- a/server/src/Utterance.cpp
+++ b/server/src/Utterance.cpp
@@ -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.
+ *
+ */
 
 #include "Utterance.h"
 using namespace std;
@@ -32,88 +32,94 @@ using namespace boost;
 
 #define DEBUG_PRINT_PHONEMES 1
 
-Utterance::Utterance(){
-    playing = false;
-    text = "UNINITIALISED UTTERANCE";
-    audio_data = boost::shared_ptr<AudioData>(new AudioData());
+Utterance::Utterance() {
+	playing = false;
+	text = "UNINITIALISED UTTERANCE";
+	audio_data = boost::shared_ptr<AudioData>(new AudioData());
 }
 
-void Utterance::set_phoneme_vector(phonemes_vector_t p){
-    phonemes_vector = p;
+void Utterance::set_phoneme_vector(phonemes_vector_t p) {
+	phonemes_vector = p;
 }
 
-void Utterance::set_text(string t){
-    text = t;
+void Utterance::set_text(string t) {
+	text = t;
 }
 
-void Utterance::set_audio_data(boost::shared_ptr<AudioData> a){
-    audio_data = a;
+void Utterance::set_audio_data(boost::shared_ptr<AudioData> a) {
+	audio_data = a;
 }
 
-Utterance::~Utterance(){
+Utterance::~Utterance() {
 }
 
-string Utterance::get_text(){
-    return text;
+string Utterance::get_text() {
+	return text;
 }
 
-boost::shared_ptr<AudioData> Utterance::get_audio_data(){
-    return audio_data;
+boost::shared_ptr<AudioData> Utterance::get_audio_data() {
+	return audio_data;
 }
 
-void Utterance::start_playback(){
-    if (phonemes_vector.size() == 0){
-        printf("> we have an empty phoneme vector. not playing.\n");
-        return;
-    }
+void Utterance::start_playback() {
+	if (phonemes_vector.size() == 0) {
+		printf("> we have an empty phoneme vector. not playing.\n");
+		return;
+	}
 
-    //set iterator to start:
-    phonemes_vector_iterator = phonemes_vector.begin();
+	// set iterator to start:
+	phonemes_vector_iterator = phonemes_vector.begin();
 
-    //fetch first end time
-    symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
-    symbol_end_time = get_system_time() + boost::posix_time::milliseconds(symbol_duration_pair.second);
+	// fetch first end time
+	symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
+	symbol_end_time = get_system_time() + boost::posix_time::milliseconds(symbol_duration_pair.second);
 
-    printf("> we have %d pairs\n",(int)phonemes_vector.size());
+	printf("> we have %d pairs\n", (int)phonemes_vector.size());
 
-    //go!
-    playing = true;
+	// go!
+	playing = true;
 }
 
-string Utterance::currently_active_phoneme(){
-    //not active -> return
-    if (!playing) return "";
-
-    //empty phoneme list
-    if (phonemes_vector.size() == 0) return "";
-
-    system_time now = get_system_time();
-
-    while(now > symbol_end_time){
-        //fetch next phoneme:
-        symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
-        symbol_end_time = symbol_end_time + boost::posix_time::milliseconds(symbol_duration_pair.second);
-        //printf("time: %d", symbol_duration_pair.second);
-
-        //do we have to increment the iterator or are we done? (NOTE: -1 is necessary here!)
-        if (phonemes_vector_iterator < phonemes_vector.end() - 1){
-            phonemes_vector_iterator++;
-        }else{
-            //reached end, stop playback
-            playing=false;
-            return "";
-            if (DEBUG_PRINT_PHONEMES) printf("\n");
-        }
-    }
-
-    //fetch active symbol:
-    string symbol = ((symbol_duration_pair_t)*phonemes_vector_iterator).first;
-    //printf("> active symbol = %s\n",symbol.c_str());
-    if (DEBUG_PRINT_PHONEMES) printf("%s ",symbol.c_str()); fflush(stdout);
-
-    return symbol;
+string Utterance::currently_active_phoneme() {
+	// not active -> return
+	if (!playing)
+		return "";
+
+	// empty phoneme list
+	if (phonemes_vector.size() == 0)
+		return "";
+
+	system_time now = get_system_time();
+
+	while (now > symbol_end_time) {
+		// fetch next phoneme:
+		symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
+		symbol_end_time = symbol_end_time + boost::posix_time::milliseconds(symbol_duration_pair.second);
+		// printf("time: %d", symbol_duration_pair.second);
+
+		// do we have to increment the iterator or are we done? (NOTE: -1 is necessary here!)
+		if (phonemes_vector_iterator < phonemes_vector.end() - 1) {
+			phonemes_vector_iterator++;
+		}
+		else {
+			// reached end, stop playback
+			playing = false;
+			return "";
+			if (DEBUG_PRINT_PHONEMES)
+				printf("\n");
+		}
+	}
+
+	// fetch active symbol:
+	string symbol = ((symbol_duration_pair_t)*phonemes_vector_iterator).first;
+	// printf("> active symbol = %s\n",symbol.c_str());
+	if (DEBUG_PRINT_PHONEMES)
+		printf("%s ", symbol.c_str());
+	fflush(stdout);
+
+	return symbol;
 }
 
-bool Utterance::is_playing(){
-    return playing;
+bool Utterance::is_playing() {
+	return playing;
 }
