[asterisk-commits] main/app.c: Transmit Silence on ControlPlayback pause (asterisk[14])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Nov 18 15:47:01 CST 2016
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4470 )
Change subject: main/app.c: Transmit Silence on ControlPlayback pause
......................................................................
main/app.c: Transmit Silence on ControlPlayback pause
ASTERISK-26562 #close
Change-Id: Ie6cb0ffc2b8c775639ce7784fe96f4ea00cfa2f8
---
M main/app.c
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Verified
diff --git a/main/app.c b/main/app.c
index e1d7049..d5e3314 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1073,6 +1073,7 @@
int res;
long pause_restart_point = 0;
long offset = 0;
+ struct ast_silence_generator *silgen = NULL;
if (!file) {
return -1;
@@ -1163,6 +1164,10 @@
if ((suspend && strchr(suspend, res)) || res == AST_CONTROL_STREAM_SUSPEND) {
pause_restart_point = ast_tellstream(ast_channel_stream(chan));
+
+ if (ast_opt_transmit_silence) {
+ silgen = ast_channel_start_silence_generator(chan);
+ }
ast_test_suite_event_notify("PLAYBACK","Channel: %s\r\n"
"Control: %s\r\n",
ast_channel_name(chan),
@@ -1176,6 +1181,11 @@
break;
}
}
+ if (silgen) {
+ ast_channel_stop_silence_generator(chan, silgen);
+ silgen = NULL;
+ }
+
if ((suspend && (res == *suspend)) || res == AST_CONTROL_STREAM_SUSPEND) {
res = 0;
ast_test_suite_event_notify("PLAYBACK","Channel: %s\r\n"
--
To view, visit https://gerrit.asterisk.org/4470
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6cb0ffc2b8c775639ce7784fe96f4ea00cfa2f8
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mikheili Dautashvili <mishadaut at gmail.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list