void OpenTrack(CUE_File.Command.TRACK trackCommand) { //assert that a file is open if (curr_file == null) { Error("Track command encountered with no active file"); throw new DiscJobAbortException(); } curr_track = new CompiledCueTrack(); //spill cdtext data into this track curr_cdtext = curr_track.CDTextData; curr_track.BlobIndex = curr_blobIndex; curr_track.Number = trackCommand.Number; curr_track.TrackType = trackCommand.Type; //default flags if (curr_track.TrackType != CueTrackType.Audio) { curr_track.Flags = CueTrackFlags.DATA; } if (!curr_fileHasTrack) { curr_fileHasTrack = curr_track.IsFirstInFile = true; } UpdateDiscInfo(trackCommand); }
void UpdateDiscInfo(CUE_File.Command.TRACK trackCommand) { if (OUT_CompiledDiscInfo.FirstRecordedTrackNumber == 0) { OUT_CompiledDiscInfo.FirstRecordedTrackNumber = trackCommand.Number; } OUT_CompiledDiscInfo.LastRecordedTrackNumber = trackCommand.Number; if (!discinfo_session1Format_determined) { switch (trackCommand.Type) { case CueTrackType.Mode2_2336: case CueTrackType.Mode2_2352: OUT_CompiledDiscInfo.SessionFormat = SessionFormat.Type20_CDXA; discinfo_session1Format_determined = true; break; case CueTrackType.CDI_2336: case CueTrackType.CDI_2352: OUT_CompiledDiscInfo.SessionFormat = SessionFormat.Type10_CDI; discinfo_session1Format_determined = true; break; default: break; } } }