summaryrefslogtreecommitdiff
path: root/navit/speech
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-05-03 23:00:49 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-05-03 23:00:49 +0000
commitcbd7aadb4de5729e6f9359641f33c188f796acf1 (patch)
tree2da85bef48ac383f1e3e8ffeaadfbc54e0769f48 /navit/speech
parenta516ccbecc963b70bfc15e2391f260e68a2b1b6c (diff)
downloadnavit-svn-cbd7aadb4de5729e6f9359641f33c188f796acf1.tar.gz
Fix:speech_iphone:Link against framework, better diagnostics
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5071 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/speech')
-rw-r--r--navit/speech/iphone/CMakeLists.txt1
-rw-r--r--navit/speech/iphone/speech_iphone.m12
2 files changed, 7 insertions, 6 deletions
diff --git a/navit/speech/iphone/CMakeLists.txt b/navit/speech/iphone/CMakeLists.txt
index fff10ffd..16b75cb1 100644
--- a/navit/speech/iphone/CMakeLists.txt
+++ b/navit/speech/iphone/CMakeLists.txt
@@ -1 +1,2 @@
+set(speech_iphone_LIBS "-F ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks -framework VoiceServices")
module_add_library(speech_iphone speech_iphone.m)
diff --git a/navit/speech/iphone/speech_iphone.m b/navit/speech/iphone/speech_iphone.m
index 7b443abf..384d0741 100644
--- a/navit/speech/iphone/speech_iphone.m
+++ b/navit/speech/iphone/speech_iphone.m
@@ -33,13 +33,11 @@ struct speech_priv {
static int
speech_iphone_say(struct speech_priv *this, const char *text)
{
-#if 0
- NSString *s=[[NSString alloc]initWithCString:text encoding:NSMacOSRomanStringEncoding];
-#else
- NSString *s=[NSString stringWithUTF8String: text];
-#endif
- [this->speech startSpeakingString:s];
+ dbg(0,"enter %s\n",text);
+ NSString *s=[[NSString alloc]initWithUTF8String: text];
+ [this->speech startSpeakingString:s toURL:nil];
[s release];
+ dbg(0,"ok\n");
return 1;
}
@@ -62,6 +60,7 @@ speech_iphone_new(struct speech_methods *meth, struct attr **attrs, struct attr
*meth=speech_iphone_meth;
this=g_new0(struct speech_priv,1);
this->speech=[[NSClassFromString(@"VSSpeechSynthesizer") alloc] init];
+ dbg(0,"this->speech=%p\n",this->speech);
[this->speech setRate:(float)1.0];
return this;
}
@@ -70,5 +69,6 @@ speech_iphone_new(struct speech_methods *meth, struct attr **attrs, struct attr
void
plugin_init(void)
{
+ dbg(0,"enter\n");
plugin_register_speech_type("iphone", speech_iphone_new);
}