player/Control: Play*() returns Error information
This commit is contained in:
@@ -49,18 +49,20 @@ PlayerControl::~PlayerControl()
|
||||
delete tagged_song;
|
||||
}
|
||||
|
||||
void
|
||||
PlayerControl::Play(DetachedSong *song)
|
||||
bool
|
||||
PlayerControl::Play(DetachedSong *song, Error &error_r)
|
||||
{
|
||||
assert(song != nullptr);
|
||||
|
||||
const ScopeLock protect(mutex);
|
||||
SeekLocked(song, SongTime::zero(), IgnoreError());
|
||||
bool success = SeekLocked(song, SongTime::zero(), error_r);
|
||||
|
||||
if (state == PlayerState::PAUSE)
|
||||
if (success && state == PlayerState::PAUSE)
|
||||
/* if the player was paused previously, we need to
|
||||
unpause it */
|
||||
PauseLocked();
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user