On Wed, Sep 14, 2011 at 9:07 AM,  <span dir="ltr"><<a href="mailto:Joerg-Cyril.Hoehle@t-systems.com" target="_blank">Joerg-Cyril.Hoehle@t-systems.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I've never tried to understand quartz, but I'd like to know whether quartz<br>
expects particular behaviour from the underlying winmm or mmdevapi<br>
time/position/length functions.<br></blockquote><div><br>At least for what I've been dealing with so far quartz uses dsound for handling the underlying buffers.� So, I would imagine if you've solved the quirks for dsound then you've likely handled quartz as well.<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
For instance, quartz says its clocks are monotically increasing, whereas no<br>
such requirement is documented (or at least known to me) for the audio stream<br>
positions. This may seem obvious, but then I came across some mailing list where<br>
people reported a sudden backward change in stream position when pluggin/unplugging<br>
earphones or the like.<br></blockquote><div><br>There are a few different ways to <i>return</i> time in quartz, but it appears that everything comes down to the reference clock eventually.� Have you looked at REFERENCE_TIME and IReferenceClock?.<a href="http://msdn.microsoft.com/en-us/library/dd377507%28v=vs.85%29.aspx" target="_blank"></a><br>

<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Is quartz very decoupled from the underlying audio information?<br></blockquote><div><br>From my exploration it appears to be, but I'm not an expert yet.� In the patch you're replying to I just corrected the time conversion between IMediaSeeking (which uses REFERENCE_TIME, LONGLONG measured in 100ns) and IMediaPosition (which uses REFTIME, double measured in seconds).� I am trying to look into the time handling further though, as the background music stutters horribly in Fallout 3 (though it works great in Fallout New Vegas).<br>

<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Who stops the clock (if at all) while the stream is paused?<br></blockquote><div><br>At least in Wine the reference clock is not stopped when a stream is paused.� When pausing the clock is retrieved and stored (MediaControl_Pause) and then on resume it is retrieved again and adjusted to create a new start time (MediaControl_Run).� From the reading I've done I don't think there is a way to stop the reference clock, aside from writing and using your own custom clock.<br>

<br>I hope that helps somewhat.� I'm not sure exactly what you're trying to do wrt. testing quartz, but if there's some way I can help then please let me know.<br><br>Erich Hoover<br><a href="mailto:ehoover@mines.edu">ehoover@mines.edu</a><br>
</div></div>