<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY style="COLOR: #000000; FONT-FAMILY: Arial" bgColor=#c0c0c0><LABEL
id=HbSession SessionId="2775648579"></LABEL>
<DIV><FONT size=2>Dear Ross,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>My streamer uses a audio recorder, not a file source. So
finally, I combined what you said, and what I found in
WindowsAudioInputDevice_common.cpp. The following is my current codes. Please
take a look and tell me if it is right. </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> // If there is no compressed sound
data<BR> if
(UnitNum==0){<BR> nextTask() =
envir().taskScheduler().scheduleDelayedTask(<BR>
PktGapUSec,(TaskFunc*)FramedSource::afterGetting,
this);<BR> return; // now
<STRONG><U>PktGapUSec=20</U></STRONG> <BR>
};</FONT></DIV>
<DIV><FONT size=2> //Otherwise, there is compressed sound
data</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> // Set the 'presentation time' and
'duration' of this frame:<BR> if (fPresentationTime.tv_sec ==
0 && fPresentationTime.tv_usec == 0) {<BR> // This is
the first frame, so use the current
time:<BR> int
Idunno;<BR>
gettimeofday(&fPresentationTime, &Idunno);<BR> } else
{<BR> // Increment by the play time of the previous
data:<BR> unsigned uSeconds =
fPresentationTime.tv_usec +
PktPlayUSec;<BR>
fPresentationTime.tv_sec +=
uSeconds/1000000;<BR>
fPresentationTime.tv_usec = uSeconds%1000000;<BR>
}</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> // Remember the play time of this
data:<BR> PktPlayUSec=UnitUSec*UnitNum;<BR>
fDurationInMicroseconds=PktPlayUSec;</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> afterGetting(this); // <STRONG><U>No delay
at all</U></STRONG></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks for your time and help.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>David Wu</FONT></DIV>
<DIV><FONT size=2> </DIV>
<DIV><BR></DIV></FONT>
<P></P></BODY></HTML>