2018-08-28 Fred Gleason <fredg@paravelsystems.com>

* Added an optional third argument to the 'Add Next' ['PX'] RML
	to allow specication of the transition type.
This commit is contained in:
Fred Gleason 2018-08-28 10:54:35 -04:00
parent 41c9489354
commit 65e7559009
4 changed files with 22 additions and 8 deletions

View File

@ -16669,3 +16669,6 @@
2018-08-23 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in ripcd(8) that caused process of the 'Air Gate' ['AG']
RML to fail.
2018-08-28 Fred Gleason <fredg@paravelsystems.com>
* Added an optional third argument to the 'Add Next' ['PX'] RML
to allow specication of the transition type.

View File

@ -218,11 +218,13 @@
<para>
<userinput>PX
<replaceable>mach</replaceable>
<replaceable>cart</replaceable>!</userinput>
<replaceable>cart</replaceable>
[PLAY|SEGUE|STOP]!</userinput>
</para>
<para>
Insert cart <replaceable>cart</replaceable>> in the next to play
position on log machine <replaceable>mach</replaceable>.
Insert cart <replaceable>cart</replaceable> in the next to play
position on log machine <replaceable>mach</replaceable>. The
transition may also be optionally specified.
</para>
</sect2>

View File

@ -41,6 +41,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
RDLogLine *logline=NULL;
QString label;
int mach=0;
RDLogLine::TransType trans=RDLogLine::Play;
if(rml->role()!=RDMacro::Cmd) {
return;
@ -782,7 +783,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
break;
case RDMacro::PX: // Add Next
if(rml->argQuantity()!=2) {
if((rml->argQuantity()<2)||(rml->argQuantity()>3)) {
if(rml->echoRequested()) {
rml->acknowledge(false);
rdripc->sendRml(rml);
@ -797,15 +798,24 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
}
return;
}
trans=RDLogLine::Play;
if(rml->argQuantity()==3) {
if(rml->arg(2).toString().lower()=="segue") {
trans=RDLogLine::Segue;
}
if(rml->arg(2).toString().lower()=="stop") {
trans=RDLogLine::Stop;
}
}
if(air_log[rml->arg(0).toInt()-1]->nextLine()>=0) {
air_log[rml->arg(0).toInt()-1]->
insert(air_log[rml->arg(0).toInt()-1]->nextLine(),
rml->arg(1).toUInt(),RDLogLine::Play);
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
}
else {
air_log[rml->arg(0).toInt()-1]->
insert(air_log[rml->arg(0).toInt()-1]->size(),
rml->arg(1).toUInt(),RDLogLine::Play);
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
air_log[rml->arg(0).toInt()-1]->
makeNext(air_log[rml->arg(0).toInt()-1]->size()-1);
}

View File

@ -833,8 +833,7 @@ void LogPlay::insert(int line,int cartnum,RDLogLine::TransType next_type,
if(nextLine()<0) {
play_next_line=line;
}
logline->loadCart(cartnum,next_type,play_id,play_timescaling_available,
rdairplay_conf->defaultTransType());
logline->loadCart(cartnum,next_type,play_id,play_timescaling_available,type);
logline->
setTimescalingActive(play_timescaling_available&&logline->enforceLength());
UpdateStartTimes(line);