mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-15 23:21:14 +02:00
2021-12-21 Fred Gleason <fredg@paravelsystems.com>
* Moved the PANEL_MAX_OUTPUTS define in 'lib/rdsound_panel.h' to RD_SOUNDPANEL_MAX_OUTPUTS in 'lib/rd.h'. * Added a 'RDPortNames' class. * Added a 'RDCoreApplication::portNames()' method. * Refactored rdairplay(1) to use 'RDPortNames'. * Refactored rdpanel(1) to use 'RDPortNames'. * Removed the 'RDAirPlayConf::portName()' method. * Removed the 'RDAirPlayConf::soundPanelChannelName()' method. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -83,30 +83,6 @@ void RDAirPlayConf::setPort(RDAirPlayConf::Channel chan,int port) const
|
||||
}
|
||||
|
||||
|
||||
QString RDAirPlayConf::portLabel(RDAirPlayConf::Channel chan) const
|
||||
{
|
||||
QString ret="??";
|
||||
QString sql;
|
||||
RDSqlQuery *q=NULL;
|
||||
|
||||
sql=QString("select ")+
|
||||
"`AUDIO_OUTPUTS`.`LABEL` "+ // 00
|
||||
"from `RDAIRPLAY_CHANNELS` left join `AUDIO_OUTPUTS` "+
|
||||
"on `RDAIRPLAY_CHANNELS`.`PORT`=`AUDIO_OUTPUTS`.`PORT_NUMBER` where "+
|
||||
"`AUDIO_OUTPUTS`.`STATION_NAME`='"+RDEscapeString(air_station)+"' && "+
|
||||
"`AUDIO_OUTPUTS`.`CARD_NUMBER`=`RDAIRPLAY_CHANNELS`.`CARD` && "+
|
||||
"`AUDIO_OUTPUTS`.`PORT_NUMBER`=`RDAIRPLAY_CHANNELS`.`PORT` && "+
|
||||
QString::asprintf("`RDAIRPLAY_CHANNELS`.`INSTANCE`=%u",chan);
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
ret=q->value(0).toString();
|
||||
}
|
||||
delete q;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
QString RDAirPlayConf::startRml(RDAirPlayConf::Channel chan) const
|
||||
{
|
||||
return GetChannelValue("START_RML",chan).toString();
|
||||
@@ -1069,13 +1045,6 @@ QString RDAirPlayConf::channelText(RDAirPlayConf::Channel chan)
|
||||
}
|
||||
|
||||
|
||||
QString RDAirPlayConf::soundPanelChannelName(int mport)
|
||||
{
|
||||
return portLabel(RDAirPlayConf::soundPanelChannel(mport));
|
||||
}
|
||||
|
||||
|
||||
|
||||
RDAirPlayConf::Channel RDAirPlayConf::soundPanelChannel(int mport)
|
||||
{
|
||||
switch(mport-1) {
|
||||
|
Reference in New Issue
Block a user