summaryrefslogtreecommitdiff
path: root/libs/ardour/export_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/export_handler.cc')
-rw-r--r--libs/ardour/export_handler.cc35
1 files changed, 27 insertions, 8 deletions
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index b45edc9b9e..b44c46e549 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -519,15 +519,26 @@ void
ExportHandler::write_cue_header (CDMarkerStatus & status)
{
string title = status.timespan->name().compare ("Session") ? status.timespan->name() : (string) session.name();
- string catalog = SessionMetadata::Metadata()->catalog();
+
+ // Album metadata
+ string barcode = SessionMetadata::Metadata()->barcode();
+ string album_artist = SessionMetadata::Metadata()->album_artist();
+ string album_title = SessionMetadata::Metadata()->album();
status.out << "REM Cue file generated by " << PROGRAM_NAME << endl;
- if (catalog != "")
- status.out << "CATALOG " << catalog << endl;
+
+ if (barcode != "")
+ status.out << "CATALOG " << barcode << endl;
+
+ if (album_artist != "")
+ status.out << "PERFORMER " << cue_escape_cdtext (album_artist) << endl;
+
+ if (album_title != "")
+ title = album_title;
status.out << "TITLE " << cue_escape_cdtext (title) << endl;
- /* The original cue sheet sepc metions five file types
+ /* The original cue sheet spec mentions five file types
WAVE, AIFF,
BINARY = "header-less" audio (44.1 kHz, 16 Bit, little endian),
MOTOROLA = "header-less" audio (44.1 kHz, 16 Bit, big endian),
@@ -559,15 +570,23 @@ void
ExportHandler::write_toc_header (CDMarkerStatus & status)
{
string title = status.timespan->name().compare ("Session") ? status.timespan->name() : (string) session.name();
- string catalog = SessionMetadata::Metadata()->catalog();
- if (catalog != "")
- status.out << "CATALOG " << catalog << endl;
+ // Album metadata
+ string barcode = SessionMetadata::Metadata()->barcode();
+ string album_artist = SessionMetadata::Metadata()->album_artist();
+ string album_title = SessionMetadata::Metadata()->album();
+
+ if (barcode != "")
+ status.out << "CATALOG " << barcode << endl;
+
+ if (album_title != "")
+ title = album_title;
status.out << "CD_DA" << endl;
status.out << "CD_TEXT {" << endl << " LANGUAGE_MAP {" << endl << " 0 : EN" << endl << " }" << endl;
status.out << " LANGUAGE 0 {" << endl << " TITLE " << toc_escape_cdtext (title) << endl ;
- status.out << " PERFORMER \"\"" << endl << " }" << endl << "}" << endl;
+ status.out << " PERFORMER \"" << toc_escape_cdtext (album_artist) << "\"" << endl;
+ status.out << " }" << endl << "}" << endl;
}
void