player/Control: move IDLE_PLAYER to Player::SeekDecoder()
This emits the event even if PlayerControl::Play() is used to replay the current song, which emits the missing "player" idle event. Closes #381
This commit is contained in:
parent
a75d2fdd5a
commit
7aa1dceef6
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
||||||
ver 0.20.23 (not yet released)
|
ver 0.20.23 (not yet released)
|
||||||
|
* protocol
|
||||||
|
- emit "player" idle event when restarting the current song
|
||||||
* new clang crash bug workaround
|
* new clang crash bug workaround
|
||||||
|
|
||||||
ver 0.20.22 (2018/10/23)
|
ver 0.20.22 (2018/10/23)
|
||||||
|
|
|
@ -246,12 +246,8 @@ PlayerControl::LockSeek(DetachedSong *song, SongTime t)
|
||||||
{
|
{
|
||||||
assert(song != nullptr);
|
assert(song != nullptr);
|
||||||
|
|
||||||
{
|
const std::lock_guard<Mutex> protect(mutex);
|
||||||
const std::lock_guard<Mutex> protect(mutex);
|
SeekLocked(song, t);
|
||||||
SeekLocked(song, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
idle_add(IDLE_PLAYER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -580,6 +580,8 @@ Player::SeekDecoder()
|
||||||
{
|
{
|
||||||
assert(pc.next_song != nullptr);
|
assert(pc.next_song != nullptr);
|
||||||
|
|
||||||
|
idle_add(IDLE_PLAYER);
|
||||||
|
|
||||||
pc.outputs.Cancel();
|
pc.outputs.Cancel();
|
||||||
|
|
||||||
const SongTime start_time = pc.next_song->GetStartTime();
|
const SongTime start_time = pc.next_song->GetStartTime();
|
||||||
|
|
Loading…
Reference in New Issue