2019-01-29 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in log rendering that caused custom transitions
	to be rendered as a PLAY transition.
This commit is contained in:
Fred Gleason 2019-01-29 17:58:29 -05:00
parent 090998d56d
commit 22b2fdf39a
2 changed files with 19 additions and 13 deletions

View File

@ -16742,3 +16742,6 @@
broke time display in rdlogedit(1).
2018-11-21 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 2.19.3int02.
2019-01-29 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in log rendering that caused custom transitions
to be rendered as a PLAY transition.

View File

@ -2,7 +2,7 @@
//
// Render a Rivendell log to a single audio object.
//
// (C) Copyright 2017 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2017-2019 Fred Gleason <fredg@paravelsystems.com>
//
// 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));