2024-08-30 Fred Gleason <fredg@paravelsystems.com>

* Removed the 'RDLogPlay::setSegueLength()' method.
	* Fixed regressions in rdairplay(1) that could cause the end of
	play-outs to be clipped.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2024-08-30 15:35:05 -04:00
parent d290a7b0c4
commit 17b6048a3f
4 changed files with 59 additions and 46 deletions

View File

@@ -24885,3 +24885,7 @@
to be treated as PLAYs.
2024-08-29 Fred Gleason <fredg@paravelsystems.com>
* Removed various debugging statements.
2024-08-30 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'RDLogPlay::setSegueLength()' method.
* Fixed regressions in rdairplay(1) that could cause the end of
play-outs to be clipped.

View File

@@ -45,7 +45,6 @@ RDLogPlay::RDLogPlay(int id,RDEventPlayer *player,bool enable_cue,QObject *paren
play_id=id;
play_event_player=player;
play_onair_flag=false;
play_segue_length=rda->airplayConf()->segueLength()+1;
play_trans_length=rda->airplayConf()->transLength()+1;
play_duck_volume_port1=0;
play_duck_volume_port2=0;
@@ -261,12 +260,6 @@ void RDLogPlay::setChannels(int cards[2],int ports[2],QString labels[2],
}
void RDLogPlay::setSegueLength(int len)
{
play_segue_length=len;
}
void RDLogPlay::setNowCart(unsigned cartnum)
{
play_now_cartnum=cartnum;
@@ -373,11 +366,11 @@ bool RDLogPlay::play(int line,RDLogLine::StartSource src,
}
bool ret = false;
if(play_segue_length==0) {
ret = StartEvent(line,RDLogLine::Play,0,src,mport);
} else {
ret = StartEvent(line,RDLogLine::Segue,play_segue_length,src,mport);
int segue_length=0;
if(src==RDLogLine::StartManual) {
rda->airplayConf()->segueLength();
}
ret = StartEvent(line,RDLogLine::Segue,segue_length,src,mport);
SetTransTimer(current_time);
return ret;
}
@@ -573,7 +566,6 @@ void RDLogPlay::load()
delete log;
play_line_counter=0;
play_next_line=0;
// UpdateStartTimes(0);
UpdateStartTimes();
emit reloaded();
SetTransTimer();
@@ -1954,14 +1946,6 @@ bool RDLogPlay::StartEvent(int line,RDLogLine::TransType trans_type,
//
running=runningEvents(lines);
if(play_op_mode!=RDAirPlayConf::Manual) {
//
// Remove degenerate segue transitions
//
if((trans_type==RDLogLine::Segue)&&(trans_length<=0)) {
trans_type=RDLogLine::Play;
}
switch(trans_type) {
case RDLogLine::Play:
for(int i=0;i<running;i++) {

View File

@@ -66,7 +66,6 @@ class RDLogPlay : public RDLogModel
void setLogName(QString name);
void setChannels(int cards[2],int ports[2],QString labels[2],
const QString start_rml[2],const QString stop_rml[2]);
void setSegueLength(int len);
void setNowCart(unsigned cartnum);
void setNextCart(unsigned cartnum);
void auditionHead(int line);
@@ -209,7 +208,6 @@ class RDLogPlay : public RDLogModel
RDCae *play_cae;
RDAirPlayConf::OpMode play_op_mode;
int play_slot_id[LOGPLAY_MAX_PLAYS];
int play_segue_length;
int play_trans_length;
int play_next_line;
int play_line_counter;

View File

@@ -2,7 +2,7 @@
//
// Abstract a Rivendell Playback Deck
//
// (C) Copyright 2003-2023 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2003-2024 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
@@ -456,12 +456,8 @@ void RDPlayDeck::play(unsigned pos,int segue_start,int segue_end,
if(play_serial==0) {
return;
}
if(segue_start>=0) {
play_point_value[RDPlayDeck::Segue][0]=segue_start;
}
if(segue_end>=0) {
play_point_value[RDPlayDeck::Segue][1]=segue_end;
}
play_point_value[RDPlayDeck::Segue][0]=segue_start;
play_point_value[RDPlayDeck::Segue][1]=segue_end;
play_start_position=pos;
play_current_position=pos;
play_last_start_position=play_start_position;
@@ -512,13 +508,6 @@ void RDPlayDeck::play(unsigned pos,int segue_start,int segue_end,
play_cae->
play(play_serial,len,play_timescale_speed,false);
play_end_timer->start(len);
/*
play_cae->
play(play_serial,
(int)(100000.0*(double)(play_audio_point[1]-play_audio_point[0]-pos)/
(double)play_timescale_speed),
play_timescale_speed,false);
*/
play_start_time=QTime::currentTime();
StartTimers(pos);
play_state=RDPlayDeck::Playing;
@@ -678,7 +667,7 @@ void RDPlayDeck::pointTimerData(int point)
case RDPlayDeck::Segue:
if(play_point_state[point]) {
play_point_state[point]=false;
printf(" segueEnd: %s\n",QTime::currentTime().toString("hh:mm:ss.zzz").toUtf8().constData());
rda->cae()->stopPlay(play_serial);
emit segueEnd(play_id);
}
else {
@@ -807,11 +796,50 @@ void RDPlayDeck::StartTimers(int offset)
int audio_point;
play_end_timer->stop();
for(int i=0;i<RDPlayDeck::SizeOf;i++) {
//
// Initialize Segue Timers
//
play_point_state[RDPlayDeck::Segue]=false;
audio_point=(int)
(RD_TIMESCALE_DIVISOR*(double)play_audio_point[0]/
(double)play_timescale_speed);
if((play_point_value[RDPlayDeck::Segue][0]>=0)&&
(play_point_value[RDPlayDeck::Segue][1]>=0)&&
(play_point_value[RDPlayDeck::Segue][1]>
play_point_value[RDPlayDeck::Segue][0])) {
// Setup Full Segue
if((play_point_value[RDPlayDeck::Segue][0]-audio_point-offset)>=0) {
play_point_timer[RDPlayDeck::Segue]->
start(play_point_value[RDPlayDeck::Segue][0]-audio_point-offset);
}
else {
if((play_point_value[RDPlayDeck::Segue][1]-audio_point-offset)>=0) {
play_point_state[RDPlayDeck::Segue]=true;
play_point_timer[RDPlayDeck::Segue]->
start(play_point_value[RDPlayDeck::Segue][1]-audio_point-offset);
}
}
if(rda->config()->padSegueOverlaps()>0) {
play_point_timer[RDPlayDeck::Segue]->stop();
play_point_timer[RDPlayDeck::Segue]->
start(play_point_timer[RDPlayDeck::Segue]->interval()+
rda->config()->padSegueOverlaps());;
}
}
else {
// Setup "Play Style" Segue
play_point_timer[RDPlayDeck::Segue]->
start(play_audio_point[1]-play_audio_point[0]+100);
}
//
// Initialize Hook and Talk Timers
//
for(int i=RDPlayDeck::Hook;i<RDPlayDeck::SizeOf;i++) {
play_point_state[i]=false;
if((i==RDPlayDeck::Segue)||((play_point_value[i][0]!=-1)&&
(play_point_value[i][0]!=play_point_value[i][1]))) {
if((play_point_value[i][0]!=-1)&&
(play_point_value[i][0]!=play_point_value[i][1])) {
audio_point=(int)
(RD_TIMESCALE_DIVISOR*(double)play_audio_point[0]/
(double)play_timescale_speed);
@@ -826,13 +854,12 @@ void RDPlayDeck::StartTimers(int offset)
start(play_point_value[i][1]-audio_point-offset);
}
}
if((i==0)&&(rda->config()->padSegueOverlaps()>0)) {
play_point_timer[0]->stop();
play_point_timer[0]->start(play_point_timer[0]->interval()+
rda->config()->padSegueOverlaps());;
}
}
}
//
// Setup FadeUp and FadeDown Timers
//
if((play_fade_point[1]!=-1)&&(offset<play_fade_point[1])&&
((play_fade_down=play_audio_point[1]-play_fade_point[1])>0)) {
play_fade_timer->start(play_fade_point[1]-play_audio_point[0]-offset);