Hmm.
Well the first thing you need to be able to do is to save the audio stream
to a file. Assuming that you have succeeded in that, then you would need to
figure out a way to chop off the last portion of the file,and append to the
front of it in "chunks" of X minutes worth of audio.
Unfortunately, there isn't any kind of "circular file" that I know of, you'd
have to do it by periodically replacing the file contents.
Much of the difficulty revolves around the codec being used. For example, if
its a WAV file, there needs to be a WAV header at the beginning (usually the
first 44 bytes) in which the audio length and properties are specified.
Similar for WMV, ASF, RM etc. files.
Peter