コード例 #1
0
        void AddIndex(CUE_File.Command.INDEX indexCommand)
        {
            var newindex = new CompiledCueIndex();

            newindex.FileMSF = indexCommand.Timestamp;
            newindex.Number  = indexCommand.Number;
            curr_track.Indexes.Add(newindex);
        }
コード例 #2
0
        void CloseTrack()
        {
            if (curr_track == null)
            {
                return;
            }

            //normalize: if an index 0 is missing, add it here
            if (curr_track.Indexes.Count == 0)
            {
                curr_track = null;
                return;
            }


            if (curr_track.Indexes[0].Number != 0)
            {
                var index0 = new CompiledCueIndex();
                var index1 = curr_track.Indexes[0];
                index0.Number  = 0;
                index0.FileMSF = index1.FileMSF; //same MSF as index 1 will make it effectively nonexistent

                //well now, if it's the first in the file, an implicit index will take its value from 00:00:00 in the file
                //this is the kind of thing I sought to solve originally by 'interpreting' the file, but it seems easy enough to handle this way
                //my carlin.cue tests this but test cases shouldnt be hard to find
                if (curr_track.IsFirstInFile)
                {
                    index0.FileMSF = new Timestamp(0);
                }

                curr_track.Indexes.Insert(0, index0);
            }

            OUT_CompiledCueTracks.Add(curr_track);
            curr_track = null;
        }