MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / LockUpdate

Method LockUpdate

src/output/Control.cxx:299–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299bool
300AudioOutputControl::LockUpdate(const AudioFormat audio_format,
301 const MusicPipe &mp,
302 bool force) noexcept
303{
304 std::unique_lock lock{mutex};
305
306 if (enabled && really_enabled) {
307 if (force || !fail_timer.IsDefined() ||
308 fail_timer.Check(REOPEN_AFTER)) {
309 return Open(std::move(lock), audio_format, mp);
310 }
311 } else if (IsOpen())
312 CloseWait(lock);
313
314 return false;
315}
316
317bool
318AudioOutputControl::IsChunkConsumed(const MusicChunk &chunk) const noexcept

Callers 1

UpdateMethod · 0.80

Calls 3

OpenFunction · 0.85
IsDefinedMethod · 0.80
CheckMethod · 0.45

Tested by

no test coverage detected