Author: sayer
Date: 2009-04-01 16:25:14 +0200 (Wed, 01 Apr 2009)
New Revision: 1348
Modified:
trunk/apps/dsm/mods/mod_utils/ModUtils.cpp
trunk/apps/dsm/mods/mod_utils/ModUtils.h
trunk/apps/dsm/mods/mod_utils/Readme.mod_utils.txt
Log:
spell action (like SayDigits)
Modified: trunk/apps/dsm/mods/mod_utils/ModUtils.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_utils/ModUtils.cpp 2009-03-31 22:38:18 UTC (rev
1347)
+++ trunk/apps/dsm/mods/mod_utils/ModUtils.cpp 2009-04-01 14:25:14 UTC (rev
1348)
@@ -58,6 +58,7 @@
DEF_CMD("utils.playCountRight", SCUPlayCountRightAction);
DEF_CMD("utils.playCountLeft", SCUPlayCountLeftAction);
DEF_CMD("utils.getNewId", SCGetNewIdAction);
+ DEF_CMD("utils.spell", SCUSpellAction);
return NULL;
}
@@ -143,3 +144,14 @@
string d = resolveVars(arg, sess, sc_sess, event_params);
sc_sess->var[d]=AmSession::getNewId();
} EXEC_ACTION_END;
+
+CONST_ACTION_2P(SCUSpellAction, ',', true);
+EXEC_ACTION_START(SCUSpellAction) {
+ string basedir = resolveVars(par2, sess, sc_sess, event_params);
+
+ string play_string = resolveVars(par1, sess, sc_sess, event_params);
+ DBG("spelling '%s'\n", play_string.c_str());
+ for (size_t i=0;i<play_string.length();i++)
+ sc_sess->playFile(basedir+play_string[i]+".wav", false);
+
+} EXEC_ACTION_END;
Modified: trunk/apps/dsm/mods/mod_utils/ModUtils.h
===================================================================
--- trunk/apps/dsm/mods/mod_utils/ModUtils.h 2009-03-31 22:38:18 UTC (rev
1347)
+++ trunk/apps/dsm/mods/mod_utils/ModUtils.h 2009-04-01 14:25:14 UTC (rev
1348)
@@ -42,5 +42,5 @@
DEF_ACTION_2P(SCUPlayCountRightAction);
DEF_ACTION_2P(SCUPlayCountLeftAction);
DEF_ACTION_1P(SCGetNewIdAction);
-
+DEF_ACTION_2P(SCUSpellAction);
#endif
Modified: trunk/apps/dsm/mods/mod_utils/Readme.mod_utils.txt
===================================================================
--- trunk/apps/dsm/mods/mod_utils/Readme.mod_utils.txt 2009-03-31 22:38:18 UTC
(rev 1347)
+++ trunk/apps/dsm/mods/mod_utils/Readme.mod_utils.txt 2009-04-01 14:25:14 UTC
(rev 1348)
@@ -1,8 +1,16 @@
Actions:
utils.getNewId(string varname)
-- play count for laguages that have single digits after the 10s (like
english)
- utils.playCountRight(int cnt [, string basedir)
+ utils.playCountRight(int cnt [, string basedir])
-- play count for laguages that have single digits befire the 10s (like
german)
- utils.playCountLeft(int cnt [, string basedir)
+ utils.playCountLeft(int cnt [, string basedir])
+
+ utils.spell(string word[, string basedir])
+ plays each character in the word (e.g. utils.spell(321,wav/digits/) plays
+ wav/digits/3.wav, wav/digits/2.wav, wav/digits/1.wav
+ like SayDigits
+
+SCUSpellAction
+
Conditions:
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev