[PATCH] emacspeak: handle more Dectalk commands - :np, :nh, :nu, :nb.

Dmitri Paduchikh dpaduchikh на gmail.com
Вс Фев 24 11:13:20 MSK 2013


---
 emacspeak/LineParser.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/emacspeak/LineParser.cpp b/emacspeak/LineParser.cpp
index bac8c9f..c6b6aaf 100644
--- a/emacspeak/LineParser.cpp
+++ b/emacspeak/LineParser.cpp
@@ -76,11 +76,20 @@ void LineParser::processDectalkCommand(const std::string& s, size_t& pitch)
   StringDelimitedIterator<std::string> it(s, " \t");
   while(it.next())
     {
-      if (toLower(it.str()) == ":dv")
+      const std::string token(toLower(it.str()));
+      if (token == ":dv")
 	{
 	  processDectalkDefineVoice(it, pitch);
 	  return;
 	}
+      else if (token == ":np")
+	pitch = 50;
+      else if (token == ":nh")
+	pitch = 3;
+      else if (token == ":nu")
+	pitch = 90;
+      else if (token == ":nb")
+	pitch = 100;
     }
 }
 
-- 
1.8.1.4




Подробная информация о списке рассылки Homeros