         
         # -- set up header and frame functions -- #
         
-        @lastHeader = null
-        @headerFunc = (data,header) => @lastHeader = data
-        
-        @frameFunc = (frame) =>                
-            # make sure we don't get a frame before header
-            if @lastHeader
-                # if we're at max length, shift off a frame (or more, if needed)
-                while @buffer.length > @max
-                    @buffer.shift()
-
-                # take the new frame, add the header back in, and push it to the buffer
-                buf = new Buffer( @lastHeader.length + frame.length )
-                @lastHeader.copy(buf,0)
-                frame.copy(buf,@lastHeader.length)
-                @buffer.push buf
-
-                # loop through all connected listeners and pass the frame buffer at 
-                # their offset.
-                bl = @buffer.length
-                for l in @listeners
-                    # we'll give them whatever is at length - offset
-                    l.writeFrame @buffer[ bl - 1 - l._offset ]
+        @dataFunc = (chunk) =>
+            # if we're at max length, shift off a chunk (or more, if needed)
+            while @buffer.length > @max
+                @buffer.shift()
+
+            # push the chunk on the buffer
+            @buffer.push chunk
+
+            # loop through all connected listeners and pass the frame buffer at 
+            # their offset.
+            bl = @buffer.length
+            for l in @listeners
+                # we'll give them whatever is at length - offset
+                l.writeFrame @buffer[ bl - 1 - l._offset ]
         
         # -- look for stream connections -- #
                 

    
    bufferedSecs: ->
        # convert buffer length to seconds
        Math.round @buffer.length / @framesPerSec 
        
    #----------
    
    checkOffset: (offset) ->
        # we're passed offset in seconds. we'll convert it to frames
        offset = Math.round Number(offset) * @framesPerSec
        
        console.log "asked about offset of ", offset
        

            # -- disconnect from old source -- #
            
            if @source
                @source.removeListener "data", @dataFunc
            
            # -- compute initial stats -- #
            
            source.once "header", (data,header) =>
                if @secsPerChunk && @secsPerChunk == @stream.source.emit_duration
                    # reconnecting, but rate matches so we can keep using 
                    # our existing buffer.
                    @log.debug "Rewind buffer validated new source.  Reusing buffer."
                
                else
                    if @secsPerChunk
                        # we're reconnecting, but didn't match rate...  we 
                        # should wipe out the old buffer
                        @buffer = []
                        
                    # compute new frame numbers
                    @secsPerChunk   = @stream.source.emit_duration
                    @max            = Math.round @options.seconds / @secsPerChunk
                    @burst          = Math.round @options.burst / @secsPerChunk
        
                    console.log "Rewind's max buffer length is ", @max
                
            # connect our data listener
            source.on "data", @dataFunc
                    
            # keep track of our source
            @source = source

