player/Control: add "occupied" flag to skip REFRESH
Reduces main thread contention. Avoids blocking the main thread in "status" commands.
This commit is contained in:
@@ -367,6 +367,8 @@ Player::StartDecoder(MusicPipe &_pipe) noexcept
|
||||
void
|
||||
Player::StopDecoder() noexcept
|
||||
{
|
||||
const PlayerControl::ScopeOccupied occupied(pc);
|
||||
|
||||
dc.Stop();
|
||||
|
||||
if (dc.pipe != nullptr) {
|
||||
@@ -624,6 +626,8 @@ Player::SeekDecoder() noexcept
|
||||
}
|
||||
|
||||
try {
|
||||
const PlayerControl::ScopeOccupied occupied(pc);
|
||||
|
||||
dc.Seek(where + start_time);
|
||||
} catch (...) {
|
||||
/* decoder failure */
|
||||
|
Reference in New Issue
Block a user