diff --git a/ChangeLog b/ChangeLog index efca7a11..2e54e5ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24386,3 +24386,20 @@ 2023-08-29 Fred Gleason * Refactored the playback, record and mixer commands in the CAE protocol design document. +2023-08-29 Fred Gleason + * Removed support for the 'Set Input Volume' ['IV'] CAE command. + * Removed support for the 'Set Input Level' ['IL'] CAE command. + * Removed support for the 'Set Output Level' ['OL'] CAE command. + * Removed support for the 'Set Input Mode' ['IM'] CAE command. + * Removed support for the 'Set Output Mode' ['OM'] CAE command. + * Removed support for the 'Set Input Vox Level' ['IX'] CAE command. + * Removed support for the 'Set Input Type' ['IT'] CAE command. + * Removed support for the 'Set Clock Source' ['CS'] CAE command. + * Removed the 'RDCae::setClockSource()' method. + * Removed the 'RDCae::setInputVolume()' method. + * Removed the 'RDCae::setInputLevel()' method. + * Removed the 'RDCae::setOutputLevel()' method. + * Removed the 'RDCae::setInputMode()' method. + * Removed the 'RDCae::setOutputMode()' method. + * Removed the 'RDCae::setInputVOXLevel()' method. + * Removed the 'RDCae::setInputType()' method. diff --git a/cae/cae.cpp b/cae/cae.cpp index 6ba82e85..6d3615ac 100644 --- a/cae/cae.cpp +++ b/cae/cae.cpp @@ -207,6 +207,8 @@ MainObject::MainObject(QObject *parent) SIGNAL(setAudioPassthroughLevelReq(int,unsigned,unsigned,unsigned,int)), this, SLOT(setAudioPassthroughLevelData(int,unsigned,unsigned,unsigned,int))); + connect(cae_server,SIGNAL(updateAudioPorts(int)), + this,SLOT(updateAudioPortsData(int))); connect(cae_server,SIGNAL(setClockSourceReq(int,unsigned,int)), this,SLOT(setClockSourceData(int,unsigned,int))); connect(cae_server, @@ -969,6 +971,31 @@ void MainObject::setAudioPassthroughLevelData(int id,unsigned card, } +void MainObject::updateAudioPortsData(int id) +{ + for(int i=0;iconfig()->stationName(),i); + Driver *dvr=GetDriver(i); + + if(dvr!=NULL) { + dvr->setClockSource(i,port->clockSource()); + for(int j=0;jinputPortType(j)==RDAudioPort::Analog) { + dvr->setInputType(i,j,RDCae::Analog); + } + else { + dvr->setInputType(i,j,RDCae::AesEbu); + } + dvr->setInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j)); + dvr->setOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j)); + dvr->setInputMode(i,j,port->inputPortMode(j)); + } + } + delete port; + } +} + + void MainObject::setClockSourceData(int id,unsigned card,int input) { if((card<0)||(input<0)) { @@ -1229,28 +1256,17 @@ void MainObject::InitProvisioning() const void MainObject::InitMixers() { - for(int i=0;iconfig()->stationName(),i); - Driver *dvr=GetDriver(i); + Driver *dvr=NULL; + updateAudioPortsData(-1); + for(int i=0;isetClockSource(i,port->clockSource()); for(int j=0;jsetPassthroughLevel(i,j,k,RD_MUTE_DEPTH); } - if(port->inputPortType(j)==RDAudioPort::Analog) { - dvr->setInputType(i,j,RDCae::Analog); - } - else { - dvr->setInputType(i,j,RDCae::AesEbu); - } - dvr->setInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j)); - dvr->setOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j)); - dvr->setInputMode(i,j,port->inputPortMode(j)); } } - delete port; } } diff --git a/cae/cae.h b/cae/cae.h index d72c24bb..7b534ec3 100644 --- a/cae/cae.h +++ b/cae/cae.h @@ -100,6 +100,7 @@ class MainObject : public QObject void getInputStatusData(int id,unsigned card,unsigned port); void setAudioPassthroughLevelData(int id,unsigned card,unsigned input, unsigned output,int level); + void updateAudioPortsData(int id); void setClockSourceData(int id,unsigned card,int input); void setOutputStatusFlagData(int id,unsigned card,unsigned port, unsigned stream,bool state); diff --git a/cae/cae_server.cpp b/cae/cae_server.cpp index 27fecdb9..e9c3807c 100644 --- a/cae/cae_server.cpp +++ b/cae/cae_server.cpp @@ -398,21 +398,6 @@ bool CaeServer::ProcessCommand(int id,const QString &cmd) } } } - if((f0.at(0)=="IV")&&(f0.size()==4)) { // Set Input Volume - unsigned card=f0.at(1).toUInt(&ok); - if(ok&&(card2) { // So we don't warn if no cards are specified uint16_t udp_port=0xFFFF&f0.at(1).toUInt(&ok); diff --git a/cae/cae_server.h b/cae/cae_server.h index 5bbb1446..30a74a8c 100644 --- a/cae/cae_server.h +++ b/cae/cae_server.h @@ -68,7 +68,8 @@ class CaeServer : public QObject void loadPlaybackReq(int id,unsigned card,const QString &name); void unloadPlaybackReq(int id,unsigned handle); void playPositionReq(int id,unsigned handle,unsigned pos); - void playReq(int id,unsigned handle,unsigned length,unsigned speed,unsigned pitch_flag); + void playReq(int id,unsigned handle,unsigned length,unsigned speed, + unsigned pitch_flag); void stopPlaybackReq(int id,unsigned handle); void timescalingSupportReq(int id,unsigned card); void loadRecordingReq(int id,unsigned card,unsigned port,unsigned coding, @@ -78,23 +79,16 @@ class CaeServer : public QObject void recordReq(int id,unsigned card,unsigned stream,unsigned len, int threshold_level); void stopRecordingReq(int id,unsigned card,unsigned stream); - void setInputVolumeReq(int id,unsigned card,unsigned stream,int level); void setOutputPortReq(int id,unsigned card,unsigned stream,unsigned port, - int level); + int level); void setOutputVolumeReq(int id,unsigned card,unsigned stream,int port, int level); void fadeOutputVolumeReq(int id,unsigned card,unsigned stream,unsigned port, int level,unsigned length); - void setInputLevelReq(int id,unsigned card,unsigned port,int level); - void setOutputLevelReq(int id,unsigned card,unsigned port,int level); - void setInputModeReq(int id,unsigned card,unsigned stream,unsigned mode); - void setOutputModeReq(int id,unsigned card,unsigned stream,unsigned mode); - void setInputVoxLevelReq(int id,unsigned card,unsigned stream,int level); - void setInputTypeReq(int id,unsigned card,unsigned port,unsigned type); void getInputStatusReq(int id,unsigned card,unsigned port); void setAudioPassthroughLevelReq(int id,unsigned card,unsigned input, unsigned output,int level); - void setClockSourceReq(int id,unsigned card,int input); + void updateAudioPortsReq(int id); void setOutputStatusFlagReq(int id,unsigned card,unsigned port, unsigned stream,bool state); void openRtpCaptureChannelReq(int id,unsigned card,unsigned port,uint16_t udp_port, diff --git a/docs/apis/cae.xml b/docs/apis/cae.xml index d9e22b56..684a4060 100644 --- a/docs/apis/cae.xml +++ b/docs/apis/cae.xml @@ -1171,6 +1171,18 @@ + + + <command>Update Audio Ports</command> + + Update all audio ports to match current database settings. + + + + AP + + + diff --git a/lib/rdcae.cpp b/lib/rdcae.cpp index 32296d4e..76deca8e 100644 --- a/lib/rdcae.cpp +++ b/lib/rdcae.cpp @@ -282,18 +282,6 @@ void RDCae::stopRecord(int card,int stream) } -void RDCae::setClockSource(int card,RDCae::ClockSource src) -{ - SendCommand(QString::asprintf("CS %d %d!",card,src)); -} - - -void RDCae::setInputVolume(int card,int stream,int level) -{ - SendCommand(QString::asprintf("IV %d %d %d!",card,stream,level)); -} - - void RDCae::setOutputVolume(int card,int stream,int port,int level) { SendCommand(QString::asprintf("OV %d %d %d %d!",card,stream,port,level)); @@ -313,42 +301,6 @@ void RDCae::fadeOutputVolume(int card,int stream,int port,int level,int length) } -void RDCae::setInputLevel(int card,int port,int level) -{ - SendCommand(QString::asprintf("IL %d %d %d!",card,port,level)); -} - - -void RDCae::setOutputLevel(int card,int port,int level) -{ - SendCommand(QString::asprintf("OL %d %d %d!",card,port,level)); -} - - -void RDCae::setInputMode(int card,int stream,RDCae::ChannelMode mode) -{ - SendCommand(QString::asprintf("IM %d %d %d!",card,stream,mode)); -} - - -void RDCae::setOutputMode(int card,int stream,RDCae::ChannelMode mode) -{ - SendCommand(QString::asprintf("OM %d %d %d!",card,stream,mode)); -} - - -void RDCae::setInputVOXLevel(int card,int stream,int level) -{ - SendCommand(QString::asprintf("IX %d %d %d!",card,stream,level)); -} - - -void RDCae::setInputType(int card,int port,RDCae::SourceType type) -{ - SendCommand(QString::asprintf("IT %d %d %d!",card,port,type)); -} - - void RDCae::setPassthroughVolume(int card,int in_port,int out_port,int level) { SendCommand(QString(). diff --git a/lib/rdcae.h b/lib/rdcae.h index ecd0d81f..1f43c213 100644 --- a/lib/rdcae.h +++ b/lib/rdcae.h @@ -52,17 +52,9 @@ class RDCae : public QObject void unloadRecord(int card,int stream); void record(int card,int stream,unsigned length,int threshold); void stopRecord(int card,int stream); - void setClockSource(int card,RDCae::ClockSource src); - void setInputVolume(int card,int stream,int level); void setOutputVolume(int card,int stream,int port,int level); void setOutputPort(int card,int stream,int port); void fadeOutputVolume(int card,int stream,int port,int level,int length); - void setInputLevel(int card,int port,int level); - void setOutputLevel(int card,int port,int level); - void setInputMode(int card,int stream,RDCae::ChannelMode mode); - void setOutputMode(int card,int stream,RDCae::ChannelMode mode); - void setInputVOXLevel(int card,int stream,int level); - void setInputType(int card,int port,RDCae::SourceType type); void setPassthroughVolume(int card,int in_port,int out_port,int level); bool inputStatus(int card,int port) const; void inputMeterUpdate(int card,int port,short levels[2]);