- if (numtracks == 0 ) {
- /* the user supplied no track markers.
- we now treat the session as one track.*/
-
- out << endl << "TRACK AUDIO" << endl;
-
- out << "COPY" << endl;
-
- out << "NO PRE_EMPHASIS" << endl;
-
- /* XXX add session properties for catalog etc.
- (so far only the session name is used) */
-
- out << "CD_TEXT {" << endl << " LANGUAGE 0 {" << endl << " TITLE \"" << session->name() << "\"" << endl;
- out << " }" << endl << "}" << endl;
-
- out << "FILE \"" << path << "\" ";
- out << "00:00:00 " ;
- frames_to_cd_frames_string (buf, spec.end_frame - spec.start_frame, session->frame_rate());
- out << buf << endl;
- out << "START 00:00:00" << endl;
-
- last_start_time = spec.start_frame;
- last_end_time = spec.end_frame;
- }
-
- if (temp.size()) {
- LocationSortByStart cmp;
- temp.sort (cmp);
-
- for (i = temp.begin(); i != temp.end(); ++i) {
-
- if (!(*i)->is_mark()) {
- /*this is a track */
- out << endl << "TRACK AUDIO" << endl;
-
- if ((*i)->cd_info.find("scms") != (*i)->cd_info.end()) {
- out << "NO ";
- }
- out << "COPY" << endl;
-
- if ((*i)->cd_info.find("preemph") != (*i)->cd_info.end()) {
- out << "PRE_EMPHASIS" << endl;
- } else {
- out << "NO PRE_EMPHASIS" << endl;
- }
-
- if ((*i)->cd_info.find("isrc") != (*i)->cd_info.end()) {
- out << "ISRC \"" << (*i)->cd_info["isrc"] << "\"" << endl;
- }
-
- out << "CD_TEXT {" << endl << " LANGUAGE 0 {" << endl << " TITLE \"" << (*i)->name() << "\"" << endl;
- if ((*i)->cd_info.find("performer") != (*i)->cd_info.end()) {
- out << " PERFORMER \"" << (*i)->cd_info["performer"] << "\"" << endl;
- }
- if ((*i)->cd_info.find("string_composer") != (*i)->cd_info.end()) {
- out << " COMPOSER \"" << (*i)->cd_info["string_composer"] << "\"" << endl;
- }
-
- if ((*i)->cd_info.find("isrc") != (*i)->cd_info.end()) {
- out << " ISRC \"";
- out << (*i)->cd_info["isrc"].substr(0,2) << "-";
- out << (*i)->cd_info["isrc"].substr(2,3) << "-";
- out << (*i)->cd_info["isrc"].substr(5,2) << "-";
- out << (*i)->cd_info["isrc"].substr(7,5) << "\"" << endl;
- }
-
- out << " }" << endl << "}" << endl;
-
- frames_to_cd_frames_string (buf, last_end_time - spec.start_frame, session->frame_rate());
- out << "FILE \"" << path << "\" " << buf;
-
- frames_to_cd_frames_string (buf, (*i)->end() - last_end_time, session->frame_rate());
- out << buf << endl;
-
- frames_to_cd_frames_string (buf, (*i)->start() - last_end_time, session->frame_rate());
- out << "START" << buf << endl;
-
- last_start_time = (*i)->start();
- last_end_time = (*i)->end();
-
-
- } else if ((*i)->start() < last_end_time) {
- /* this is an index within a track */
-
- frames_to_cd_frames_string (buf, (*i)->start() - last_start_time, session->frame_rate());
- out << "INDEX" << buf << endl;
- }