From 22b2fdf39a0bd86dd0b98c7d427d9444e4e0d60d Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 29 Jan 2019 17:58:29 -0500 Subject: [PATCH] 2019-01-29 Fred Gleason * Fixed a bug in log rendering that caused custom transitions to be rendered as a PLAY transition. --- ChangeLog | 3 +++ lib/rdrenderer.cpp | 29 ++++++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 015bb1b6..c128688b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16742,3 +16742,6 @@ broke time display in rdlogedit(1). 2018-11-21 Fred Gleason * Incremented the package version to 2.19.3int02. +2019-01-29 Fred Gleason + * Fixed a bug in log rendering that caused custom transitions + to be rendered as a PLAY transition. diff --git a/lib/rdrenderer.cpp b/lib/rdrenderer.cpp index 227e533b..f3391045 100644 --- a/lib/rdrenderer.cpp +++ b/lib/rdrenderer.cpp @@ -2,7 +2,7 @@ // // Render a Rivendell log to a single audio object. // -// (C) Copyright 2017 Fred Gleason +// (C) Copyright 2017-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -93,10 +93,9 @@ void __RDRenderLogLine::setRampRate(double lvl) void __RDRenderLogLine::setRamp(RDLogLine::TransType next_trans) { - if((next_trans==RDLogLine::Segue)&& - (ll_cut->segueStartPoint()>=0)&&(ll_cut->segueEndPoint()>=0)) { + if((next_trans==RDLogLine::Segue)&&(segueStartPoint()>=0)) { ll_ramp_rate=((double)RD_FADE_DEPTH)/ - ((double)FramesFromMsec(ll_cut->segueEndPoint()-ll_cut->segueStartPoint())); + ((double)FramesFromMsec(segueEndPoint()-segueStartPoint())); } } @@ -111,6 +110,10 @@ bool __RDRenderLogLine::open(const QTime &time) if(ll_cart->exists()&&(ll_cart->type()==RDCart::Audio)) { if(ll_cart->selectCut(&cutname,time)) { ll_cut=new RDCut(cutname); + setStartPoint(ll_cut->startPoint(),RDLogLine::CartPointer); + setEndPoint(ll_cut->endPoint(),RDLogLine::CartPointer); + setSegueStartPoint(ll_cut->segueStartPoint(),RDLogLine::CartPointer); + setSegueEndPoint(ll_cut->segueEndPoint(),RDLogLine::CartPointer); QString filename; if(GetCutFile(cutname,ll_cut->startPoint(),ll_cut->endPoint(), &filename)) { @@ -506,18 +509,18 @@ bool RDRenderer::Render(const QString &outfile,RDLogEvent *log,RDSettings *s, lls.at(i)->title()+"]"); sf_count_t frames=0; if((lls.at(i+1)->transType()==RDLogLine::Segue)&& - (lls.at(i)->cut()->segueStartPoint()>=0)) { - frames=FramesFromMsec(lls.at(i)->cut()->segueStartPoint()- - lls.at(i)->cut()->startPoint()); + (lls.at(i)->segueStartPoint()>=0)) { + frames=FramesFromMsec(lls.at(i)->segueStartPoint()- + lls.at(i)->startPoint()); current_time= - current_time.addMSecs(lls.at(i)->cut()->segueStartPoint()- - lls.at(i)->cut()->startPoint()); + current_time.addMSecs(lls.at(i)->segueStartPoint()- + lls.at(i)->startPoint()); } else { - frames=FramesFromMsec(lls.at(i)->cut()->endPoint()- - lls.at(i)->cut()->startPoint()); - current_time=current_time.addMSecs(lls.at(i)->cut()->endPoint()- - lls.at(i)->cut()->startPoint()); + frames=FramesFromMsec(lls.at(i)->endPoint()- + lls.at(i)->startPoint()); + current_time=current_time.addMSecs(lls.at(i)->endPoint()- + lls.at(i)->startPoint()); } pcm=new float[frames*s->channels()]; memset(pcm,0,frames*s->channels()*sizeof(float));