2020-02-26 Fred Gleason <fredg@paravelsystems.com>

* Added sanity check code to 'RDRender'.
This commit is contained in:
Fred Gleason
2020-02-26 15:08:04 -05:00
parent b0b69338ae
commit fb9c23483f
2 changed files with 20 additions and 8 deletions

View File

@@ -19719,3 +19719,5 @@
* Removed the 'Q3ProgressBar' dependency from rdairplay(1).
2020-02-26 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Q3ProgressBar' dependency from rdcartslots(1).
2020-02-26 Fred Gleason <fredg@paravelsystems.com>
* Added sanity check code to 'RDRender'.

View File

@@ -496,17 +496,27 @@ bool RDRenderer::Render(const QString &outfile,RDLogEvent *log,RDSettings *s,
sf_count_t frames=0;
if((lls.at(i+1)->transType()==RDLogLine::Segue)&&
(lls.at(i)->segueStartPoint()>=0)) {
frames=FramesFromMsec(lls.at(i)->segueStartPoint()-
lls.at(i)->startPoint());
current_time=
current_time.addMSecs(lls.at(i)->segueStartPoint()-
if(lls.at(i)->segueStartPoint()>lls.at(i)->startPoint()) {
frames=FramesFromMsec(lls.at(i)->segueStartPoint()-
lls.at(i)->startPoint());
current_time=
current_time.addMSecs(lls.at(i)->segueStartPoint()-
lls.at(i)->startPoint());
}
else {
frames=0;
}
}
else {
frames=FramesFromMsec(lls.at(i)->endPoint()-
lls.at(i)->startPoint());
current_time=current_time.addMSecs(lls.at(i)->endPoint()-
lls.at(i)->startPoint());
if(lls.at(i)->endPoint()>lls.at(i)->startPoint()) {
frames=FramesFromMsec(lls.at(i)->endPoint()-
lls.at(i)->startPoint());
current_time=current_time.addMSecs(lls.at(i)->endPoint()-
lls.at(i)->startPoint());
}
else {
frames=0;
}
}
pcm=new float[frames*s->channels()];
memset(pcm,0,frames*s->channels()*sizeof(float));