Hi,<br><div class="gmail_quote">On 16 September 2012 09:10, Fons Adriaensen <span dir="ltr"><<a href="mailto:fons@linuxaudio.org" target="_blank">fons@linuxaudio.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Sun, Sep 16, 2012 at 12:46:42AM -0700, Henner Zeller wrote:<br>
<br>
> Over the week or so, I've build some fuse filesystem filters flac files<br>
> on-the-fly<br>
> using the zita convolver. This makes it real easy to play<br>
> around with files and filters. In particular with systems that otherwise<br>
> don't support stream convolving, but just can read files.<br>
<br>
</div>Interesting project...<br>
<br>
One thing: when skipping forward (or seeking in general)<br>
there's no need to convolve all data up to that point.<br>
If P is the new position and L is the lenght of the IR,<br>
then just call Convproc->reset(), seek the input file to<br>
P - L (or 0 if P < L), and convolve up to P. You're<br>
computing a FIR filter, so no more history is required.<br></blockquote><div><br></div><div>I know. The only reason for doing what I am doing is entirely because of the filesystem semantics.</div><div><br></div><div>On the filesystem level, I don't 'see' seeks to audio frame positions but _only_ file positions. Since the input and the output is a compressed flac file, the relationship cannot be predicted - this is why I have to walk up to that point to present a consistent view of the file (in particular if that file is mmap()ed or if users jump around in it, this is important).</div>

<div>(this would be different if input and output was wav where the relationship is clear; but wav doesn't provide such a rich header format, so that the user in media server that display tags and images would be bad).</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
If the seek involves an output discontinuity for the user,<br>
you could even just call Conproc->reset(), seek to P, and<br>
proceed normally. The result will be as if there was only<br>
silence before P.<br>
<br>
Ciao,<br>
<span><font color="#888888"><br>
--<br>
FA<br>
<br>
A world of exhaustive, reliable metadata would be an utopia.<br>
It's also a pipe-dream, founded on self-delusion, nerd hubris<br>
and hysterically inflated market opportunities. (Cory Doctorow)<br>
<br>
</font></span></blockquote></div><br>