<p>Kevin Harwell <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13809">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_mixmonitor: Turn on synchronization by default<br><br>The optional synchronization behavior created in<br>64906c4c9ba63e18f2c71310fdbf14450dac7b62 is now the default for<br>MixMonitor.<br><br>* Add a new flag 'n' that allows for this behavior to be turned off<br><br>* Add a notice when the 'S' option is used indicating that it is no<br>  longer necessary<br><br>Change-Id: I158987c475cda4e1ff1256dd0daccdd99df568b4<br>---<br>M apps/app_mixmonitor.c<br>A doc/UPGRADE-staging/app_mixmonitor_sync_default.txt<br>2 files changed, 26 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c</span><br><span>index 6746c47..16c2cd2 100644</span><br><span>--- a/apps/app_mixmonitor.c</span><br><span>+++ b/apps/app_mixmonitor.c</span><br><span>@@ -115,10 +115,10 @@</span><br><span>                                             Like with the basic filename argument, if an absolute path isn't given, it will create</span><br><span>                                           the file in the configured monitoring directory.</para></span><br><span>                                        </option></span><br><span style="color: hsl(0, 100%, 40%);">-                                 <option name="S"></span><br><span style="color: hsl(0, 100%, 40%);">-                                               <para>When combined with the <replaceable>r</replaceable> or <replaceable>t</replaceable></span><br><span style="color: hsl(0, 100%, 40%);">-                                         option, inserts silence when necessary to maintain synchronization between the receive</span><br><span style="color: hsl(0, 100%, 40%);">-                                          and transmit audio streams.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                                      <option name="n"></span><br><span style="color: hsl(120, 100%, 40%);">+                                             <para>When the <replaceable>r</replaceable> or <replaceable>t</replaceable> option is</span><br><span style="color: hsl(120, 100%, 40%);">+                                           used, MixMonitor will insert silence into the specified files to maintain</span><br><span style="color: hsl(120, 100%, 40%);">+                                             synchronization between them. Use this option to disable that behavior.</para></span><br><span>                                         </option></span><br><span>                                      <option name="i"></span><br><span>                                            <argument name="chanvar" required="true" /></span><br><span>@@ -353,7 +353,8 @@</span><br><span>  MUXFLAG_BEEP = (1 << 11),</span><br><span>      MUXFLAG_BEEP_START = (1 << 12),</span><br><span>        MUXFLAG_BEEP_STOP = (1 << 13),</span><br><span style="color: hsl(0, 100%, 40%);">-    MUXFLAG_RWSYNC = (1 << 14),</span><br><span style="color: hsl(120, 100%, 40%);">+     MUXFLAG_DEPRECATED_RWSYNC = (1 << 14),</span><br><span style="color: hsl(120, 100%, 40%);">+  MUXFLAG_NO_RWSYNC = (1 << 15),</span><br><span> };</span><br><span> </span><br><span> enum mixmonitor_args {</span><br><span>@@ -365,7 +366,8 @@</span><br><span>       OPT_ARG_UID,</span><br><span>         OPT_ARG_VMRECIPIENTS,</span><br><span>        OPT_ARG_BEEP_INTERVAL,</span><br><span style="color: hsl(0, 100%, 40%);">-  OPT_ARG_RWSYNC,</span><br><span style="color: hsl(120, 100%, 40%);">+       OPT_ARG_DEPRECATED_RWSYNC,</span><br><span style="color: hsl(120, 100%, 40%);">+    OPT_ARG_NO_RWSYNC,</span><br><span>   OPT_ARG_ARRAY_SIZE,     /* Always last element of the enum */</span><br><span> };</span><br><span> </span><br><span>@@ -382,7 +384,8 @@</span><br><span>        AST_APP_OPTION_ARG('t', MUXFLAG_WRITE, OPT_ARG_WRITENAME),</span><br><span>   AST_APP_OPTION_ARG('i', MUXFLAG_UID, OPT_ARG_UID),</span><br><span>   AST_APP_OPTION_ARG('m', MUXFLAG_VMRECIPIENTS, OPT_ARG_VMRECIPIENTS),</span><br><span style="color: hsl(0, 100%, 40%);">-    AST_APP_OPTION_ARG('S', MUXFLAG_RWSYNC, OPT_ARG_RWSYNC),</span><br><span style="color: hsl(120, 100%, 40%);">+      AST_APP_OPTION_ARG('S', MUXFLAG_DEPRECATED_RWSYNC, OPT_ARG_DEPRECATED_RWSYNC),</span><br><span style="color: hsl(120, 100%, 40%);">+        AST_APP_OPTION_ARG('n', MUXFLAG_NO_RWSYNC, OPT_ARG_NO_RWSYNC),</span><br><span> });</span><br><span> </span><br><span> struct mixmonitor_ds {</span><br><span>@@ -970,7 +973,7 @@</span><br><span>    }</span><br><span> </span><br><span>        ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_TRIGGER_SYNC);</span><br><span style="color: hsl(0, 100%, 40%);">-        if ((ast_test_flag(mixmonitor, MUXFLAG_RWSYNC))) {</span><br><span style="color: hsl(120, 100%, 40%);">+    if (!ast_test_flag(mixmonitor, MUXFLAG_NO_RWSYNC)) {</span><br><span>                 ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_SUBSTITUTE_SILENCE);</span><br><span>       }</span><br><span> </span><br><span>@@ -1049,6 +1052,11 @@</span><br><span> </span><br><span>           ast_app_parse_options(mixmonitor_opts, &flags, opts, args.options);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+           if (ast_test_flag(&flags, MUXFLAG_DEPRECATED_RWSYNC)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   ast_log(LOG_NOTICE, "The synchronization behavior enabled by the 'S' option is now the default"</span><br><span style="color: hsl(120, 100%, 40%);">+                             " and does not need to be specified.\n");</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>          if (ast_test_flag(&flags, MUXFLAG_READVOLUME)) {</span><br><span>                         if (ast_strlen_zero(opts[OPT_ARG_READVOLUME])) {</span><br><span>                             ast_log(LOG_WARNING, "No volume level was provided for the heard volume ('v') option.\n");</span><br><span>diff --git a/doc/UPGRADE-staging/app_mixmonitor_sync_default.txt b/doc/UPGRADE-staging/app_mixmonitor_sync_default.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..33a55e1</span><br><span>--- /dev/null</span><br><span>+++ b/doc/UPGRADE-staging/app_mixmonitor_sync_default.txt</span><br><span>@@ -0,0 +1,10 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: app_mixmonitor</span><br><span style="color: hsl(120, 100%, 40%);">+Master-Only: true</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+In Asterisk 13.29, a new option flag was added to MixMonitor (the 'S'</span><br><span style="color: hsl(120, 100%, 40%);">+option) that when combined with the r() or t() options would inject</span><br><span style="color: hsl(120, 100%, 40%);">+silence into these files if audio was going to be written to one and</span><br><span style="color: hsl(120, 100%, 40%);">+not that other. This allowed the files specified by r() and t() to</span><br><span style="color: hsl(120, 100%, 40%);">+subsequently be mixed outside of Asterisk and be appropriately</span><br><span style="color: hsl(120, 100%, 40%);">+synchronized. This behavior is now the default, and a new option has</span><br><span style="color: hsl(120, 100%, 40%);">+been added to disable this behavior if desired (the 'n' option).</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13809">change 13809</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13809"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I158987c475cda4e1ff1256dd0daccdd99df568b4 </div>
<div style="display:none"> Gerrit-Change-Number: 13809 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>