提交 ccfad98f authored 作者: Ken Rice's avatar Ken Rice

these got missed some how

上级 3b891d73
...@@ -1489,9 +1489,7 @@ static int activate_rtp(struct private_object *tech_pvt) ...@@ -1489,9 +1489,7 @@ static int activate_rtp(struct private_object *tech_pvt)
int r = 0; int r = 0;
if (tech_pvt->transports[LDL_TPORT_RTP].ready) { if (tech_pvt->transports[LDL_TPORT_RTP].ready) {
if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND) || tech_pvt->transports[LDL_TPORT_RTCP].accepted) { r += activate_audio_rtp(tech_pvt);
r += activate_audio_rtp(tech_pvt);
}
} }
if (tech_pvt->transports[LDL_TPORT_VIDEO_RTP].ready) { if (tech_pvt->transports[LDL_TPORT_VIDEO_RTP].ready) {
......
...@@ -91,7 +91,7 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_ ...@@ -91,7 +91,7 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_
} else { } else {
say_file("digits/%d.wav", a); say_file("digits/%d.wav", a);
} }
say_file("digits/hundred.wav"); say_file("digits/hundred.wav");
} }
if (b) { if (b) {
...@@ -106,25 +106,13 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_ ...@@ -106,25 +106,13 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_
say_file("currency/and.wav"); say_file("currency/and.wav");
} }
if (method == SSM_COUNTED) { if (method == SSM_COUNTED) {
if ( gender == SSG_MASCULINE ) { say_file("digits/h-%d0.wav", b);
say_file("digits/h-%d0_m.wav", b);
} else if ( gender == SSG_NEUTER ) {
say_file("digits/h-%d0_n.wav", b);
} else {
say_file("digits/h-%d0.wav", b);
}
} else { } else {
say_file("digits/%d0.wav", b); say_file("digits/%d0.wav", b);
} }
} else { } else {
if (method == SSM_COUNTED) { if (method == SSM_COUNTED) {
if ( gender == SSG_MASCULINE ) { say_file("digits/h-%d%d.wav", b, c);
say_file("digits/h-%d%d_m.wav", b,c);
} else if ( gender == SSG_NEUTER ) {
say_file("digits/h-%d%d_n.wav", b,c);
} else {
say_file("digits/h-%d%d.wav", b,c);
}
} else { } else {
say_file("digits/%d%d.wav", b, c); say_file("digits/%d%d.wav", b, c);
} }
...@@ -134,18 +122,12 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_ ...@@ -134,18 +122,12 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_
if (c) { if (c) {
if (method == SSM_COUNTED) { if (method == SSM_COUNTED) {
if ( gender == SSG_MASCULINE ) { say_file("digits/h-%d.wav", c);
say_file("digits/h-%d_m.wav", c);
} else if ( gender == SSG_NEUTER ) {
say_file("digits/h-%d_n.wav", c);
} else {
say_file("digits/h-%d.wav", c);
}
} else { } else {
/*"one" used as an article is feminine or masculine in german, e.g. voicemail-message is feminine /*"one" used as an article is feminine or masculine in german, e.g. voicemail-message is feminine
only applies to the likes of 1, 101, 1001 etc.*/ only applies to the likes of 1, 101, 1001 etc.*/
if ( b == 0 && c == 1 && gender == SSG_FEMININE ) { if ( b == 0 && c == 1 && gender == SSG_FEMININE ) {
say_file("digits/1_f.wav"); say_file("digits/%d_f.wav", c);
} else if ( b == 0 && c == 1 && what ) { } else if ( b == 0 && c == 1 && what ) {
say_file("digits/s-1.wav"); say_file("digits/s-1.wav");
} else { } else {
...@@ -269,11 +251,10 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, ...@@ -269,11 +251,10 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
} }
if (hours) { if (hours) {
say_num(hours, SSM_PRONOUNCED);
if (hours == 1) { if (hours == 1) {
say_file("digits/1_f.wav");
say_file("time/hour.wav"); say_file("time/hour.wav");
} else { } else {
say_num(hours, SSM_PRONOUNCED);
say_file("time/hours.wav"); say_file("time/hours.wav");
} }
} else { } else {
...@@ -282,11 +263,10 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, ...@@ -282,11 +263,10 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
} }
if (minutes) { if (minutes) {
say_num(minutes, SSM_PRONOUNCED);
if (minutes == 1) { if (minutes == 1) {
say_file("digits/1_f.wav");
say_file("time/minute.wav"); say_file("time/minute.wav");
} else { } else {
say_num(minutes, SSM_PRONOUNCED);
say_file("time/minutes.wav"); say_file("time/minutes.wav");
} }
} else { } else {
...@@ -294,13 +274,11 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, ...@@ -294,13 +274,11 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
say_file("time/minutes.wav"); say_file("time/minutes.wav");
} }
say_file("currency/and.wav");
if (seconds) { if (seconds) {
say_num(seconds, SSM_PRONOUNCED);
if (seconds == 1) { if (seconds == 1) {
say_file("digits/1_f.wav");
say_file("time/second.wav"); say_file("time/second.wav");
} else { } else {
say_num(seconds, SSM_PRONOUNCED);
say_file("time/seconds.wav"); say_file("time/seconds.wav");
} }
} else { } else {
...@@ -333,7 +311,6 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, ...@@ -333,7 +311,6 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
} }
if (say_date) { if (say_date) {
say_args->gender = SSG_MASCULINE;
say_file("time/day-%d.wav", tm.tm_wday); say_file("time/day-%d.wav", tm.tm_wday);
say_num(tm.tm_mday, SSM_COUNTED); say_num(tm.tm_mday, SSM_COUNTED);
say_file("time/mon-%d.wav", tm.tm_mon); say_file("time/mon-%d.wav", tm.tm_mon);
...@@ -341,27 +318,29 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay, ...@@ -341,27 +318,29 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
} }
if (say_time) { if (say_time) {
if (say_date) { int32_t hour = tm.tm_hour, pm = 0;
say_file("time/at.wav");
if (hour > 12) {
hour -= 12;
pm = 1;
} else if (hour == 12) {
pm = 1;
} else if (hour == 0) {
hour = 12;
pm = 0;
} }
if (tm.tm_hour == 1) { say_num(hour, SSM_PRONOUNCED);
say_file("digits/s-1.wav"); say_file("time/oclock.wav");
} else {
say_num(tm.tm_hour, SSM_PRONOUNCED); if (tm.tm_min > 9) {
} say_num(tm.tm_min, SSM_PRONOUNCED);
say_file("time/oclock.wav"); } else if (tm.tm_min) {
say_file("time/oh.wav");
if (tm.tm_min > 0) { say_num(tm.tm_min, SSM_PRONOUNCED);
say_file("currency/and.wav");
if (tm.tm_min == 1) {
say_file("digits/1_f.wav")
say_file("time/minute.wav");
} else {
say_num(tm.tm_min, SSM_PRONOUNCED);
say_file("time/minutes.wav");
}
} }
say_file("time/%s.wav", pm ? "p-m" : "a-m");
} }
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
...@@ -399,25 +378,23 @@ static switch_status_t de_say_money(switch_core_session_t *session, char *tosay, ...@@ -399,25 +378,23 @@ static switch_status_t de_say_money(switch_core_session_t *session, char *tosay,
dollars++; dollars++;
} }
/* Say dollar amount */ /* Say dollar amount */
de_say_general_count(session, dollars, say_args, args);
if (atoi(dollars) == 1) { if (atoi(dollars) == 1) {
say_file("digits/s-1.wav");
say_file("currency/dollar.wav"); say_file("currency/dollar.wav");
} else { } else {
de_say_general_count(session, dollars, say_args, args);
say_file("currency/dollars.wav"); say_file("currency/dollars.wav");
} }
/* Say "and" */
say_file("currency/and.wav");
/* Say cents */ /* Say cents */
if (cents) { if (cents) {
/* Say "and" */ de_say_general_count(session, cents, say_args, args);
say_file("currency/and.wav");
if (atoi(cents) == 1) { if (atoi(cents) == 1) {
say_file("digits/s-1.wav");
say_file("currency/cent.wav"); say_file("currency/cent.wav");
} else { } else {
de_say_general_count(session, cents, say_args, args);
say_file("currency/cents.wav"); say_file("currency/cents.wav");
} }
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论