On Fri, 2001-09-21 at 04:48, john cooper wrote:
You can approximate doing so for fixed bit rate files, but for VBR you need to calculate time starting from some known accurate point of reference. In the worst case, that is the beginning of the stream. However since you have already made a pass of the stream from beginning to the current offset, keeping (time, frame) indices on a second or 1/10th second basis should be sufficiently accurate and would consume a minimal amount of memory.
Right now I'm keeping a frame index, which is constantly updated, because that's all I need (mpg123 seeks only by frames, so mpg321 will do the same.) The problem isn't really that I need to be able to create a frame listing: I have at least a reasonably accurate one. I need to be able to tell madlib to use the new buffer (i.e., the new starting point) in the middle of decoding, instead of re-starting the decoding process, and I can't figure out any way to do so.