2023-08-14 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdvairplayd(8) that caused virtual logs to fail
	to process 'Load Log' ['LL'], 'Set Duck Level' ['MD'] and 'Stop' ['PS]
	RMLs with a 'mach' parameter of '0'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-08-14 10:43:14 -04:00
parent 45c0f59421
commit 5d3f321377
3 changed files with 15 additions and 12 deletions

View File

@ -24339,3 +24339,7 @@
* Incremented the package version to 4.0.2int1.
2023-08-09 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 4.1.0.
2023-08-14 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdvairplayd(8) that caused virtual logs to fail
to process 'Load Log' ['LL'], 'Set Duck Level' ['MD'] and 'Stop' ['PS]
RMLs with a 'mach' parameter of '0'.

View File

@ -34,7 +34,6 @@ void MainObject::rmlReceivedData(RDMacro *rml)
int fade;
RDLogLine *logline=NULL;
int index=-1;
bool all_logs=false;
int start;
int end;
int next_line;
@ -392,8 +391,8 @@ void MainObject::rmlReceivedData(RDMacro *rml)
}
return;
}
index=LogMachineIndex(rml->arg(0).toInt(),&all_logs);
if((index<0)&(!all_logs)) {
index=LogMachineIndex(rml->arg(0).toInt());
if(index<0) {
if(rml->echoRequested()) {
rml->acknowledge(false);
rda->ripc()->sendRml(rml);
@ -404,7 +403,7 @@ void MainObject::rmlReceivedData(RDMacro *rml)
if(rml->argQuantity()>1) {
fade=rml->arg(1).toInt();
}
if(all_logs) {
if(index==0) {
for(int i=0;i<RD_RDVAIRPLAY_LOG_QUAN;i++) {
air_logs[i]->stop(true,0,fade);
}
@ -434,15 +433,15 @@ void MainObject::rmlReceivedData(RDMacro *rml)
}
return;
}
index=LogMachineIndex(rml->arg(0).toInt(),&all_logs);
if((index<0)&&(!all_logs)) {
index=LogMachineIndex(rml->arg(0).toInt());
if(index<0) {
if(rml->echoRequested()) {
rml->acknowledge(false);
rda->ripc()->sendRml(rml);
}
return;
}
if(all_logs) {
if(index==0) {
for(int i=0;i<RD_RDVAIRPLAY_LOG_QUAN;i++) {
air_logs[i]->duckVolume(rml->arg(1).toInt()*100,rml->arg(2).toInt());
}
@ -590,14 +589,14 @@ void MainObject::rmlReceivedData(RDMacro *rml)
}
int MainObject::LogMachineIndex(int log_mach,bool *all) const
int MainObject::LogMachineIndex(int log_mach) const
{
if(log_mach==0) {
return 0;
}
if((log_mach<=RD_RDVAIRPLAY_LOG_BASE)||
(log_mach>RD_RDVAIRPLAY_LOG_BASE+RD_RDVAIRPLAY_LOG_QUAN)) {
return -1;
}
if(all!=NULL) {
*all=log_mach-RD_RDVAIRPLAY_LOG_BASE==0;
}
return log_mach-RD_RDVAIRPLAY_LOG_BASE-1;
}

View File

@ -47,7 +47,7 @@ class MainObject : public QObject
void SetAutoMode(int index);
void SetLiveAssistMode(int index);
void SetManualMode(int index);
int LogMachineIndex(int log_mach,bool *all=NULL) const;
int LogMachineIndex(int log_mach) const;
RDLogPlay *air_logs[RD_RDVAIRPLAY_LOG_QUAN];
QString air_start_lognames[RD_RDVAIRPLAY_LOG_QUAN];
int air_start_lines[RD_RDVAIRPLAY_LOG_QUAN];