<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<META content="Microsoft Word 10" name=Originator><LINK
href="cid:filelist.xml@01C36B03.4E2CD220" rel=File-List><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>110</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.SpellE {
        mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
        mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=EN-US style="tab-interval: .5in" vLink=purple link=blue>
<DIV><SPAN class=374401122-25082003><FONT face=Arial color=#0000ff size=2>If I
understand the script, your technique first calculates how much longer OUT
is than IN, then trims that amount off the beginning of OUT, then mixes the
files. We're using the older technique of mixing OUT and IN in reverse (starting
from the end). Do you feel this new technique is markedly better than the old
technique?</FONT></SPAN></DIV>
<DIV><SPAN class=374401122-25082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=374401122-25082003><FONT face=Arial color=#0000ff size=2>The
reason I ask is that everyone assumes the start times of OUT and IN are
always different and the end times are always the same. However, I have
gotten such mixed sync results from the reverse technique that it leads me to
believe the end times are not always the same. If that is true then the new
technique couldn't be much better than the old one.</FONT></SPAN></DIV>
<DIV><SPAN class=374401122-25082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=374401122-25082003><FONT face=Arial color=#0000ff
size=2>Thoughts?</FONT></SPAN></DIV>
<DIV><SPAN class=374401122-25082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
asterisk-users-admin@lists.digium.com
[mailto:asterisk-users-admin@lists.digium.com]<B>On Behalf Of </B>David
Harris<BR><B>Sent:</B> Monday, August 25, 2003 10:21 AM<BR><B>To:</B>
asterisk-users@lists.digium.com<BR><B>Subject:</B> [Asterisk-Users] Syncronize
Monitored Calls<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I thought I would post this in
case it might be of any use to anyone.<SPAN style="mso-spacerun: yes">
</SPAN>Not anything special but it does work.<SPAN
style="mso-spacerun: yes"> </SPAN>Keep in mind you need sox and <SPAN
class=SpellE>wmix</SPAN>.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Here is some relevant <SPAN
class=SpellE>exerpts</SPAN> of my <SPAN class=SpellE>extensions.conf</SPAN>
using John <SPAN class=SpellE><SPAN class=GramE>Todds</SPAN></SPAN>
macro.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[<SPAN class=SpellE><SPAN
class=GramE>globals</SPAN></SPAN>]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">CALLFILENAME=<SPAN
class=SpellE>foo</SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">FOO=<SPAN
class=SpellE>foo</SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">CALLERIDNUM=<SPAN
class=SpellE>foo</SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[<SPAN
class=GramE>default</SPAN>]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
287,1,Macro(dial,SIP/agent20002|20)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
287,2,Voicemail(u287)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
h,1,Macro(<SPAN class=SpellE>hangup</SPAN>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[<SPAN
class=GramE>macro-dial</SPAN>]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,1,AGI(set-<SPAN
class=SpellE>timestamp.agi</SPAN>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,2,SetVar(CALLFILENAME=${timestamp}-${CALLERIDNUM}-${MACRO_EXTEN})<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,3,Monitor(wav,${CALLFILENAME})<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,4,Dial(${ARG1},${ARG2},${ARG3})<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[<SPAN class=GramE>macro-<SPAN
class=SpellE>hangup</SPAN></SPAN>]<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,1,SetVar(MONITORDIR=/<SPAN
class=SpellE>var</SPAN>/spool/asterisk/monitor)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,2,GotoIf($[${CALLFILENAME} = ${FOO}]?6:3)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,3,System(/usr/local/bin/mix_monitor_files.pl ${MONITORDIR}
${CALLFILENAME}-<SPAN class=SpellE>in.wav</SPAN> ${CALLFILENAME}-<SPAN
class=SpellE>out.wav</SPAN> ${CALLFILENAME}.wav)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten</SPAN></FONT></SPAN></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> =>
s,6,NoOp<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Here is mix_monitor_files.pl.<SPAN
style="mso-spacerun: yes"> </SPAN><SPAN class=GramE>sox</SPAN> and <SPAN
class=SpellE>wmix</SPAN> must be in the path of your perl
script<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=GramE><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">#!/</SPAN></FONT></SPAN><SPAN
class=SpellE><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">usr</SPAN></FONT></SPAN><FONT
face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">/bin/perl<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>monitordir</SPAN> = shift;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN class=SpellE>infile</SPAN>
= shift;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN class=SpellE>outfile</SPAN>
= shift;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>finishfile</SPAN> = shift;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">chdir</SPAN></FONT></SPAN></SPAN><SPAN
class=GramE><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">(</SPAN></FONT></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>monitordir</SPAN>);<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>infile_output</SPAN> = `sox $<SPAN class=SpellE>infile</SPAN> -e
stat 2>&1`;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>outfile_output</SPAN> = `sox $<SPAN class=SpellE>outfile</SPAN>
-e stat 2>&1`;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>infile_output</SPAN> =~ /Samples read<SPAN
class=GramE>:\</SPAN>s+(\d+)/;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>infile_samples</SPAN> = $1;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>outfile_output</SPAN> =~ /Samples read<SPAN
class=GramE>:\</SPAN>s+(\d+)/;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>outfile_samples</SPAN> = $1;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=GramE><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">if(</SPAN></FONT></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>outfile_samples</SPAN> > $<SPAN
class=SpellE>infile_samples</SPAN>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN>$<SPAN class=SpellE>diff_samples</SPAN> = $<SPAN
class=SpellE>outfile_samples</SPAN> - $<SPAN
class=SpellE>infile_samples</SPAN>;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"sox $<SPAN class=SpellE>outfile</SPAN>
temp${<SPAN class=SpellE>outfile</SPAN>} trim<SPAN
style="mso-spacerun: yes"> </SPAN>${<SPAN
class=SpellE>diff_samples</SPAN>}s");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"<SPAN class=SpellE>wmix</SPAN> $<SPAN
class=SpellE>infile</SPAN> temp${<SPAN class=SpellE>outfile</SPAN>} >
$<SPAN class=SpellE>finishfile</SPAN>");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"<SPAN class=SpellE>rm</SPAN> -f $<SPAN
class=SpellE>infile</SPAN> temp${<SPAN class=SpellE>outfile</SPAN>} $<SPAN
class=SpellE>outfile</SPAN>");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=SpellE><SPAN class=GramE><FONT face=Arial
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">elsif</SPAN></FONT></SPAN></SPAN><SPAN
class=GramE><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">(</SPAN></FONT></SPAN><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">$<SPAN
class=SpellE>infile_samples</SPAN> > $<SPAN
class=SpellE>outfile_samples</SPAN>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN>$<SPAN class=SpellE>diff_samples</SPAN> = $<SPAN
class=SpellE>infile_samples</SPAN> - $<SPAN
class=SpellE>outfile_samples</SPAN>;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"sox $<SPAN class=SpellE>infile</SPAN>
temp${<SPAN class=SpellE>infile</SPAN>} trim<SPAN
style="mso-spacerun: yes"> </SPAN>${<SPAN
class=SpellE>diff_samples</SPAN>}s");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"<SPAN class=SpellE>wmix</SPAN>
temp${<SPAN class=SpellE>infile</SPAN>} $<SPAN class=SpellE>outfile</SPAN>
> $<SPAN class=SpellE>finishfile</SPAN>");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"<SPAN class=SpellE>rm</SPAN> -f
temp${<SPAN class=SpellE>infile</SPAN>} $<SPAN class=SpellE>outfile</SPAN>
$<SPAN class=SpellE>infile</SPAN>");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=GramE><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">else</SPAN></FONT></SPAN><FONT
face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"<SPAN class=SpellE>wmix</SPAN> $<SPAN
class=SpellE>infile</SPAN> $<SPAN class=SpellE>outfile</SPAN> > $<SPAN
class=SpellE>finishfile</SPAN>");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=GramE>system(</SPAN>"<SPAN class=SpellE>rm</SPAN> -f $<SPAN
class=SpellE>infile</SPAN> $<SPAN
class=SpellE>outfile</SPAN>");<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>