mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-15 23:21:14 +02:00
2021-07-02 Fred Gleason <fredg@paravelsystems.com>
* Added an 'AUDIO_INPUTS.LABEL' field to the database. * Added an 'AUDIO_OUTPUTS.LABEL' field to the database. * Incremented the database version to 350. * Added 'RDAudioPort::inputPortLabel()', 'RDAudioPort::setInputPortLabel()' 'RDAudioPort::outputPortLabel()' and 'RDAudioPort::setOutputPortLabel()' methods. * Added 'Label' fields to the 'Input Port' and 'Output Port' sections of the 'Edit Audio Ports' dialog in rdadmin(1). * Added code to rdairplay(1) to use port labels on audio meters. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -83,6 +83,30 @@ 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().sprintf("`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();
|
||||
|
Reference in New Issue
Block a user