diff options
author | Joshua Colp <jcolp@digium.com> | 2016-11-21 04:46:42 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-11-21 04:46:42 -0600 |
commit | 5c9680da9d281cb883806a630a61c5da45b643df (patch) | |
tree | d7ee8c158e4f105b96b291d420d74a8e17030829 /main/app.c | |
parent | 9e5f76c1e1cb37e2d049996560fccf0c1803b895 (diff) | |
parent | 12c4e664bc864e4272688fe9ce10a99d0630bc34 (diff) |
Merge "main/app.c: Transmit Silence on ControlPlayback pause" into 13
Diffstat (limited to 'main/app.c')
-rw-r--r-- | main/app.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/main/app.c b/main/app.c index a89e5b06f..58aa3a0fd 100644 --- a/main/app.c +++ b/main/app.c @@ -1073,6 +1073,7 @@ static int control_streamfile(struct ast_channel *chan, int res; long pause_restart_point = 0; long offset = 0; + struct ast_silence_generator *silgen = NULL; if (!file) { return -1; @@ -1161,6 +1162,10 @@ static int control_streamfile(struct ast_channel *chan, 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), @@ -1174,6 +1179,11 @@ static int control_streamfile(struct ast_channel *chan, 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" |