diff --git a/ChangeLog b/ChangeLog index 8867ea96..4eef5643 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24885,3 +24885,7 @@ to be treated as PLAYs. 2024-08-29 Fred Gleason * Removed various debugging statements. +2024-08-30 Fred Gleason + * Removed the 'RDLogPlay::setSegueLength()' method. + * Fixed regressions in rdairplay(1) that could cause the end of + play-outs to be clipped. diff --git a/lib/rdlogplay.cpp b/lib/rdlogplay.cpp index 527fc5ea..a9c8b6a8 100644 --- a/lib/rdlogplay.cpp +++ b/lib/rdlogplay.cpp @@ -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 +// (C) Copyright 2003-2024 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 @@ -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=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;iconfig()->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)&&(offset0)) { play_fade_timer->start(play_fade_point[1]-play_audio_point[0]-offset);