This project has moved and is read-only. For the latest updates, please go here.

Simplify Seeking

Oct 16, 2012 at 4:16 PM

Playing around with this...  I've added a method to Header.cs to make calculating a seek easier:

        /**
         * Returns the number of samples in this frame.
         * @return number of samples
         */
        public int number_of_samples()
        {
            // we can get away with this because each layer always returns a set number of samples per frame...  h_vbr_time_per_frame is actually a sample count
            return (int)h_vbr_time_per_frame[h_layer];
        }

This way the frame doesn't have to be decoded during a seek.

Oct 19, 2012 at 3:45 PM

cool, that's a nice optimisation, thanks for sharing