From 4c2de702566b9ed763ded41fc6b8a4ab16a10108 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 29 May 2013 13:14:44 -0400 Subject: [PATCH 1/3] CC-5185: Liquidsoap: Sometimes the 1st track ends early when crossfading is set --- airtime_mvc/application/models/Scheduler.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index 9768dbf33..b4fa10eb4 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -711,8 +711,8 @@ class Application_Model_Scheduler $doInsert = true; } - $endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']); - $endTimeDT = $this->findTimeDifference($endTimeDT, $this->crossfadeDuration); + //$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']); @@ -733,12 +733,14 @@ class Application_Model_Scheduler if ($applyCrossfades) { $nextStartDT = $this->findTimeDifference($nextStartDT, $this->crossfadeDuration); + $endTimeDT = $this->findTimeDifference($endTimeDT, $this->crossfadeDuration); /* Set it to false because the rest of the crossfades * will be applied after we insert each item */ $applyCrossfades = false; } + $endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']); if ($doInsert) { $values[] = "(". "'{$nextStartDT->format("Y-m-d H:i:s")}', ". From 90e235350f8960b5e615b80e6a75a46811ab5719 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 29 May 2013 13:16:14 -0400 Subject: [PATCH 2/3] Small fix --- airtime_mvc/application/models/Scheduler.php | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index b4fa10eb4..de6a87257 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -733,6 +733,7 @@ class Application_Model_Scheduler if ($applyCrossfades) { $nextStartDT = $this->findTimeDifference($nextStartDT, $this->crossfadeDuration); + $endTimeDT = $this->findEndTime($nextStartDT, $file['cliplength']); $endTimeDT = $this->findTimeDifference($endTimeDT, $this->crossfadeDuration); /* Set it to false because the rest of the crossfades * will be applied after we insert each item From d3355a527af20da1cf0bb5ab4b34f26d33f8a755 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 29 May 2013 13:18:37 -0400 Subject: [PATCH 3/3] Removed commented out code --- airtime_mvc/application/models/Scheduler.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index de6a87257..314eab8eb 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -711,8 +711,6 @@ class Application_Model_Scheduler $doInsert = true; } - //$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']);