Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: songs not playing fully/skipping to next before the end
This Fix is to limit the watchdog's actions on remote stream read operations only. The watchdog will no longer stop the worker thread when waiting for LMS to read data. On windows, when streaming remote sources (e.g. spotty), playback buffer (stream controller, player, etc) would fill quickly and not request more data for a duration that caused the socketwrapper's WDT mechanism to trigger. This is a simple fix that introduces a new boolean indicator inside of the stage structure: ` BOOL bIsWriting; Stage threads update the flag during both the read phase (bIsWriting=false) and the writing phase (bIsWriting=true). This allows the main socketwrapper's thread to figure out if a given stage thread is reading from a remote socket, where the wdt applies, or if it is waiting for the stage thread to write back to LMS., where the wdt should not apply. if (info[i].fIsWorkerThread) { if (0 == info[i].WatchDog _**&& !info[i].bIsWriting**_) { stderrMsg("Watchdog expired - Thread for step %i stalled.\n", i); if (bWatchdogEnabled) fDie = true; } info[i].WatchDog = 0; }
- Loading branch information