summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkoan <jkoan@users.noreply.github.com>2018-01-29 19:48:14 +0100
committerPierre GRANDIN <pgrandin@users.noreply.github.com>2018-01-29 10:48:14 -0800
commitc3a03adb3280c3772b548ab5c8f24dfe0e3599ef (patch)
treedac0d1a602f5a337435164edfd911b4855b0bffb
parent852c5e3066af3827fa41013189e2a8f3e6b78397 (diff)
downloadnavit-c3a03adb3280c3772b548ab5c8f24dfe0e3599ef.tar.gz
Remove outdated tts interface (#397)
* Delete TTS_library_stub.jar * Delete NavitSpeech.java * Update speech_android.c
-rw-r--r--navit/android/libs/TTS_library_stub.jarbin31633 -> 0 bytes
-rw-r--r--navit/android/src/org/navitproject/navit/NavitSpeech.java53
-rw-r--r--navit/speech/android/speech_android.c37
3 files changed, 1 insertions, 89 deletions
diff --git a/navit/android/libs/TTS_library_stub.jar b/navit/android/libs/TTS_library_stub.jar
deleted file mode 100644
index 194b82733..000000000
--- a/navit/android/libs/TTS_library_stub.jar
+++ /dev/null
Binary files differ
diff --git a/navit/android/src/org/navitproject/navit/NavitSpeech.java b/navit/android/src/org/navitproject/navit/NavitSpeech.java
deleted file mode 100644
index ac6b5de4c..000000000
--- a/navit/android/src/org/navitproject/navit/NavitSpeech.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Navit, a modular navigation system.
- * Copyright (C) 2005-2008 Navit Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-package org.navitproject.navit;
-
-import android.util.Log;
-
-import com.google.tts.TTS;
-
-
-public class NavitSpeech implements Runnable {
- private TTS tts;
- private TTS.InitListener ttsInitListener;
- private String what;
- private Thread thread;
-
- NavitSpeech(Navit navit)
- {
- ttsInitListener = new TTS.InitListener() {
- public void onInit(int version) {
- }
- };
- tts=new TTS(navit, ttsInitListener, true);
- }
- public void run()
- {
- Log.e("NavitSpeech","In "+what);
- tts.speak(what, 0, null);
- }
- public void say(String what)
- {
- this.what=what;
- thread = new Thread(this, "speech thread");
- thread.start();
- }
-}
-
diff --git a/navit/speech/android/speech_android.c b/navit/speech/android/speech_android.c
index 2b3f2612c..e9a206ebf 100644
--- a/navit/speech/android/speech_android.c
+++ b/navit/speech/android/speech_android.c
@@ -39,39 +39,7 @@ speech_android_say(struct speech_priv *this, const char *text)
char *str=g_strdup(text);
jstring string;
int i;
-
- if (this->flags & 2) {
- for (i = 0 ; i < strlen(str) ; i++) {
- if (str[i] == 0xc3 && str[i+1] == 0x84) {
- str[i]='A';
- str[i+1]='e';
- }
- if (str[i] == 0xc3 && str[i+1] == 0x96) {
- str[i]='O';
- str[i+1]='e';
- }
- if (str[i] == 0xc3 && str[i+1] == 0x9c) {
- str[i]='U';
- str[i+1]='e';
- }
- if (str[i] == 0xc3 && str[i+1] == 0xa4) {
- str[i]='a';
- str[i+1]='e';
- }
- if (str[i] == 0xc3 && str[i+1] == 0xb6) {
- str[i]='o';
- str[i+1]='e';
- }
- if (str[i] == 0xc3 && str[i+1] == 0xbc) {
- str[i]='u';
- str[i+1]='e';
- }
- if (str[i] == 0xc3 && str[i+1] == 0x9f) {
- str[i]='s';
- str[i+1]='s';
- }
- }
- }
+
string = (*jnienv)->NewStringUTF(jnienv, str);
dbg(lvl_debug,"enter %s\n",str);
(*jnienv)->CallVoidMethod(jnienv, this->NavitSpeech, this->NavitSpeech_say, string);
@@ -97,9 +65,6 @@ speech_android_init(struct speech_priv *ret)
jmethodID cid;
char *class="org/navitproject/navit/NavitSpeech2";
- if (ret->flags & 1)
- class="org/navitproject/navit/NavitSpeech";
-
if (!android_find_class_global(class, &ret->NavitSpeechClass)) {
dbg(lvl_error,"No class found\n");
return 0;