diff options
Diffstat (limited to 'src/libaudcore/playback.cc')
-rw-r--r-- | src/libaudcore/playback.cc | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/libaudcore/playback.cc b/src/libaudcore/playback.cc index 1391990..b7e94a0 100644 --- a/src/libaudcore/playback.cc +++ b/src/libaudcore/playback.cc @@ -144,7 +144,7 @@ void playback_set_info (int entry, Tuple && tuple) if (! lock_if (in_sync)) return; - if (tuple && tuple != pb_info.tuple) + if (tuple.valid () && tuple != pb_info.tuple) { pb_info.tuple = std::move (tuple); @@ -294,10 +294,13 @@ static void run_playback () if (! lock_if (in_sync)) return; - pb_info.filename = std::move (dec.filename); + // for a cuesheet entry, determine the source filename + pb_info.filename = pb_info.tuple.get_str (Tuple::AudioFile); + if (! pb_info.filename) + pb_info.filename = std::move (dec.filename); // check that we have all the necessary data - if (! pb_info.filename || ! pb_info.tuple || ! dec.ip || + if (! pb_info.filename || ! pb_info.tuple.valid () || ! dec.ip || (! dec.ip->input_info.keys[InputKey::Scheme] && ! dec.file)) { pb_info.error = true; @@ -616,25 +619,6 @@ EXPORT int InputPlugin::check_seek () return seek; } -/* compatibility (non-virtual) implementation of InputPlugin::read_tag(). */ -EXPORT bool InputPlugin::default_read_tag (const char * filename, - VFSFile & file, Tuple * tuple, Index<char> * image) -{ - /* just call read_tuple() and read_image() */ - if (tuple) - { - if (! (* tuple = read_tuple (filename, file))) - return false; - if (image && file && file.fseek (0, VFS_SEEK_SET) != 0) - return true; /* true: tuple was read */ - } - - if (image) - * image = read_image (filename, file); - - return true; -} - // thread-safe EXPORT bool aud_drct_get_playing () { |