Example #1
0
        private static PullSoundStreamBase ApplyTrackRange(PullSoundStreamBase self, CD.Track track)
        {
            var RangeOffset = GetFrame2Sample(self, track.Start);
            var RangeLength = track.End > track.Start
                ? GetFrame2Sample(self, track.End - track.Start)
                : self.LengthSample - RangeOffset;

            var gain = track.getTagValue("ALBUM GAIN");

            if (gain != null)
            {
                self = new ReplayGainOverrideFilter(self, Util.Util.parseDouble(gain.ToString()));
            }
            self = new RangeFilter(self, RangeOffset, RangeLength);
            return(self);
        }