db/simple/Song: add attribute "target"

Will be used for Song objects representing tracks inside a CUE file.
This commit is contained in:
Max Kellermann
2019-09-04 10:19:01 +02:00
parent 91c1274ac6
commit 5fdb804a50
5 changed files with 22 additions and 0 deletions

View File

@@ -161,12 +161,15 @@ directory_load(TextFile &file, Directory &directory)
if (directory.FindSong(name) != nullptr)
throw FormatRuntimeError("Duplicate song '%s'", name);
std::string target;
auto audio_format = AudioFormat::Undefined();
auto detached_song = song_load(file, name,
&target,
&audio_format);
auto song = std::make_unique<Song>(std::move(detached_song),
directory);
song->target = std::move(target);
song->audio_format = audio_format;
directory.AddSong(std::move(song));