<div class="gmail_quote">On Sun, Mar 15, 2009 at 7:37 PM, Adam Langley <span dir="ltr"><<a href="mailto:alangley@winscribe.com">alangley@winscribe.com</a>></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'm wrong, but I don't think it'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 "simply" rearranging blocks. (Unless you're okay with the "cross-fade" artifacts that you'll most likely get by allowing a block to be followed by a block with which it's not intended to fit together.)<br>
<br>-Carsten<br><br></div></div>