<div class="gmail_quote">On Sun, Mar 15, 2009 at 7:37 PM, Adam Langley <span dir="ltr">&lt;<a href="mailto:alangley@winscribe.com">alangley@winscribe.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I am implementing and audio recorder where I need to encode to vorbis DURING recording.<br>
I need to allow the user to cut and paste segments of encoded audio into a new stream.<br>
As such, I need to encode the audio in sub-second pages (the smallest allowable amount for the wave format), so that cut/paste can be implemented simply by re-arranging these encoded pages.</blockquote><div><br>Somebody with more knowledge of Vorbis internals will probably correct me if I&#39;m wrong, but I don&#39;t think it&#39;s going to be that simple. Vorbis uses an overlap transform in which the signal is shaped by a rising and falling envelope prior to being encoded. To reconstruct the audio, you need the falling slope of one block and the rising slope of the following block, which are overlapped such that they can be added together to yield the original waveform. This makes it fundamentally difficult to perform cut and paste by &quot;simply&quot; rearranging blocks. (Unless you&#39;re okay with the &quot;cross-fade&quot; artifacts that you&#39;ll most likely get by allowing a block to be followed by a block with which it&#39;s not intended to fit together.)<br>
<br>-Carsten<br><br></div></div>