CC-5185: Liquidsoap: Sometimes the 1st track ends early when crossfading is set

Crossfades were not getting applied to the track end time
This commit is contained in:
denise 2013-05-29 12:49:48 -04:00
parent d00f8392bb
commit 4a7a08a119
1 changed files with 2 additions and 0 deletions

View File

@ -712,6 +712,7 @@ class Application_Model_Scheduler
}
$endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']);
$endTimeDT = $this->findTimeDifference($endTimeDT, $this->crossfadeDuration);
// default fades are in seconds
// we need to convert to '00:00:00' format
$file['fadein'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadein']);
@ -821,6 +822,7 @@ class Application_Model_Scheduler
//recalculate the start/end times after the inserted items.
foreach ($followingSchedItems as $item) {
$endTimeDT = $this->findEndTime($nextStartDT, $item["clip_length"]);
$endTimeDT = $this->findTimeDifference($endTimeDT, $this->crossfadeDuration);
$update_sql = "UPDATE cc_schedule SET ".
"starts = '{$nextStartDT->format("Y-m-d H:i:s")}', ".
"ends = '{$endTimeDT->format("Y-m-d H:i:s")}', ".