<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm not really sure it was there for a good reason :)<div><br></div><div>I'm not in a position to test the patch at the moment, and I've lost the CVS tree for that package, so I can't see if it was ever changed to +1. but if someone else can test it I'll put out a new version with the fix.</div><div><br></div><div>- Steve</div><div><br><div><div>On 27 Nov 2008, at 09:31, <a href="mailto:andersvi@extern.uio.no">andersvi@extern.uio.no</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">guess the right addresat should be LAD for this...<br><br><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 0.5);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><a href="mailto:andersvi@extern.uio.no">andersvi@extern.uio.no</a><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 0.5);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">26 November 2008 17:49:53 GMT<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 0.5);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><a href="mailto:linux-audio-user@lists.linuxaudio.org">linux-audio-user@lists.linuxaudio.org</a><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 0.5);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>[LAU] timemachine click bug</b><br></span></div><br><br>I think timemachine has had a bug during the last three years or so.  It<br>introduces a zeroed (extra?) sample after the pre-record buffersize in<br>the outputfile.<br><br>Ive used a hacked version myself for some time, which seems to function<br>- at least the click is gone.<br><br>The hack just takes away a '+ 1' at a strategic place (see diffs below),<br>but im sure its there for some reason!  Maybe more C-fluent persons here<br>could look at the code and see whats a real fix?<br><br>The source is here: <a href="http://plugin.org.uk/timemachine/timemachine-0.3.1.tar.gz">http://plugin.org.uk/timemachine/timemachine-0.3.1.tar.gz</a><br><br><br>-anders<br><br><br>*** /tmp/timemachine-0.3.1/src/threads.c<span class="Apple-tab-span" style="white-space:pre">      </span>2008-11-26 18:24:35.000000000 +0100<br>--- /tmp/timemachine-0.3.1/src/threads.c~<span class="Apple-tab-span" style="white-space:pre">      </span>2005-07-18 16:03:06.000000000 +0200<br>***************<br>*** 157,164 ****<br>  <span class="Apple-tab-span" style="white-space:pre">     </span>for (j = 0; j < BUF_SIZE && i < pre_size; i++, j++) {<br>  <span class="Apple-tab-span" style="white-space:pre">        </span>    for (k = 0; k < num_ports; k++) {<br>  <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buf[j * num_ports + k] =<br>! <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>    /* pre_buffer[k][(i + 1 + pre_pos) % pre_size]; */<br>! <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>    pre_buffer[k][(i + pre_pos) % pre_size];<br>  <span class="Apple-tab-span" style="white-space:pre">        </span>    }<br>  <span class="Apple-tab-span" style="white-space:pre">       </span>}<br>  <span class="Apple-tab-span" style="white-space:pre">  </span>sf_writef_float(out, buf, j);<br>--- 157,163 ----<br>  <span class="Apple-tab-span" style="white-space:pre">    </span>for (j = 0; j < BUF_SIZE && i < pre_size; i++, j++) {<br>  <span class="Apple-tab-span" style="white-space:pre">        </span>    for (k = 0; k < num_ports; k++) {<br>  <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buf[j * num_ports + k] =<br>! <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>    pre_buffer[k][(i + 1 + pre_pos) % pre_size];<br>  <span class="Apple-tab-span" style="white-space:pre">    </span>    }<br>  <span class="Apple-tab-span" style="white-space:pre">       </span>}<br>  <span class="Apple-tab-span" style="white-space:pre">  </span>sf_writef_float(out, buf, j);<br>_______________________________________________<br>Linux-audio-user mailing list<br><a href="mailto:Linux-audio-user@lists.linuxaudio.org">Linux-audio-user@lists.linuxaudio.org</a><br>http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user<br>I think timemachine has had a bug during the last three years or so.  It<br>introduces a zeroed (extra?) sample after the pre-record buffersize in<br>the outputfile.<br><br>Ive used a hacked version myself for some time, which seems to function<br>- at least the click is gone.<br><br>The hack just takes away a '+ 1' at a strategic place (see diffs below),<br>but im sure its there for some reason!  Maybe more C-fluent persons here<br>could look at the code and see whats a real fix?<br><br>The source is here: http://plugin.org.uk/timemachine/timemachine-0.3.1.tar.gz<br><br><br>-anders<br><br><br>*** /tmp/timemachine-0.3.1/src/threads.c<span class="Apple-tab-span" style="white-space:pre">     </span>2008-11-26 18:24:35.000000000 +0100<br>--- /tmp/timemachine-0.3.1/src/threads.c~<span class="Apple-tab-span" style="white-space:pre">      </span>2005-07-18 16:03:06.000000000 +0200<br>***************<br>*** 157,164 ****<br>  <span class="Apple-tab-span" style="white-space:pre">     </span>for (j = 0; j < BUF_SIZE && i < pre_size; i++, j++) {<br>  <span class="Apple-tab-span" style="white-space:pre">        </span>    for (k = 0; k < num_ports; k++) {<br>  <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buf[j * num_ports + k] =<br>! <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>    /* pre_buffer[k][(i + 1 + pre_pos) % pre_size]; */<br>! <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>    pre_buffer[k][(i + pre_pos) % pre_size];<br>  <span class="Apple-tab-span" style="white-space:pre">        </span>    }<br>  <span class="Apple-tab-span" style="white-space:pre">       </span>}<br>  <span class="Apple-tab-span" style="white-space:pre">  </span>sf_writef_float(out, buf, j);<br>--- 157,163 ----<br>  <span class="Apple-tab-span" style="white-space:pre">    </span>for (j = 0; j < BUF_SIZE && i < pre_size; i++, j++) {<br>  <span class="Apple-tab-span" style="white-space:pre">        </span>    for (k = 0; k < num_ports; k++) {<br>  <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buf[j * num_ports + k] =<br>! <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>    pre_buffer[k][(i + 1 + pre_pos) % pre_size];<br>  <span class="Apple-tab-span" style="white-space:pre">    </span>    }<br>  <span class="Apple-tab-span" style="white-space:pre">       </span>}<br>  <span class="Apple-tab-span" style="white-space:pre">  </span>sf_writef_float(out, buf, j);<br>_______________________________________________<br>Linux-audio-user mailing list<br>Linux-audio-user@lists.linuxaudio.org<br>http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user<br><br><br>_______________________________________________<br>Linux-audio-dev mailing list<br>Linux-audio-dev@lists.linuxaudio.org<br>http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev<br></blockquote></div><br></div></body></html>