int RDCut::endPoint(bool calc) const { int n; if(!calc) { return RDGetSqlValue("CUTS","CUT_NAME",cut_name,"END_POINT",cut_db). toInt(); } if((n=RDGetSqlValue("CUTS","CUT_NAME",cut_name,"END_POINT",cut_db). toInt())!=-1) { return n; } return (int)length(); }
int RDCut::talkStartPoint(bool calc) const { int n; if(!calc) { return RDGetSqlValue("CUTS","CUT_NAME",cut_name,"TALK_START_POINT",cut_db). toInt(); } if((n=RDGetSqlValue("CUTS","CUT_NAME",cut_name,"TALK_START_POINT",cut_db). toInt())!=-1) { return n; } return 0; }
int RDCut::talkEndPoint(bool calc) const { int n; if(!calc) { return RDGetSqlValue("CUTS","CUT_NAME",cut_name,"TALK_END_POINT",cut_db). toInt(); } if((n=RDGetSqlValue("CUTS","CUT_NAME",cut_name,"TALK_END_POINT",cut_db). toInt())!=-1) { return n; } return effectiveEnd(); }
int RDCut::fadeupPoint(bool calc) const { int n; if(!calc) { return RDGetSqlValue("CUTS","CUT_NAME",cut_name,"FADEUP_POINT",cut_db). toInt(); } if((n=RDGetSqlValue("CUTS","CUT_NAME",cut_name,"FADEUP_POINT",cut_db). toInt())!=-1) { return n; } return 0; }
int RDCut::fadedownPoint(bool calc) const { int n; if(!calc) { return RDGetSqlValue("CUTS","CUT_NAME",cut_name,"FADEDOWN_POINT",cut_db). toInt(); } if((n=RDGetSqlValue("CUTS","CUT_NAME",cut_name,"FADEDOWN_POINT",cut_db). toInt())!=-1) { return n; } return effectiveEnd(); }
RDStation::BroadcastSecurityMode RDStation::broadcastSecurity() const { return (RDStation::BroadcastSecurityMode)RDGetSqlValue("STATIONS","NAME", station_name, "BROADCAST_SECURITY"). toUInt(); }
QHostAddress RDStation::address() const { QHostAddress addr; addr.setAddress(RDGetSqlValue("STATIONS","NAME",station_name,"IPV4_ADDRESS"). toString()); return addr; }
RDStation::AudioDriver RDStation::cardDriver(int cardnum) const { return (RDStation::AudioDriver) RDGetSqlValue("STATIONS","NAME",station_name, QString().sprintf("CARD%d_DRIVER",cardnum)). toInt(); }
int RDStation::timeOffset() { if (!time_offset_valid){ time_offset = RDGetSqlValue("STATIONS","NAME",station_name,"TIME_OFFSET").toInt(); time_offset_valid = true; } return time_offset; }
int RDCut::effectiveStart() const { int n; if((n=RDGetSqlValue("CUTS","CUT_NAME",cut_name,"START_POINT",cut_db). toInt())!=-1) { return n; } return 0; }
int RDCut::effectiveEnd() const { int n; if((n=RDGetSqlValue("CUTS","CUT_NAME",cut_name,"END_POINT",cut_db). toInt())!=-1) { return n; } return (int)length(); }
QString RDStation::driverVersion(AudioDriver driver) const { switch(driver) { case RDStation::None: return QString(); case RDStation::Hpi: return RDGetSqlValue("STATIONS","NAME",station_name,"HPI_VERSION"). toString(); case RDStation::Jack: return RDGetSqlValue("STATIONS","NAME",station_name,"JACK_VERSION"). toString(); case RDStation::Alsa: return RDGetSqlValue("STATIONS","NAME",station_name,"ALSA_VERSION"). toString(); } return QString(); }
QString RDCut::isrc(IsrcFormat fmt) const { QString str= RDGetSqlValue("CUTS","CUT_NAME",cut_name,"ISRC",cut_db). toString(); if((fmt==RDCut::RawIsrc)||(str.length()!=12)) { return str; } str.insert(2,"-"); str.insert(6,"-"); str.insert(9,"-"); return str; }
QHostAddress RDStation::caeAddress(RDConfig *config) const { QHostAddress addr; addr.setAddress("127.0.0.1"); if(caeStation()!="localhost") { if(caeStation()==RD_RDSELECT_LABEL) { addr.setAddress(config->audioStoreCaeHostname()); } else { addr.setAddress(RDGetSqlValue("STATIONS","NAME",caeStation(), "IPV4_ADDRESS").toString()); } } return addr; }
bool RDStation::haveCapability(Capability cap) const { switch(cap) { case RDStation::HaveOggenc: return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "HAVE_OGGENC").toString()); break; case RDStation::HaveOgg123: return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "HAVE_OGG123").toString()); break; case RDStation::HaveFlac: return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "HAVE_FLAC").toString()); break; case RDStation::HaveLame: return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "HAVE_LAME").toString()); break; case RDStation::HaveMp4Decode: return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "HAVE_MP4_DECODE").toString()); case RDStation::HaveMpg321: return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "HAVE_MPG321").toString()); case RDStation::HaveTwoLame: return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "HAVE_TWOLAME").toString()); break; } return false; }
QString RDStation::description() const { return RDGetSqlValue("STATIONS","NAME",station_name,"DESCRIPTION").toString(); }
bool RDStation::scanned() const { return RDBool(RDGetSqlValue("STATIONS","NAME",station_name,"STATION_SCANNED"). toString()); }
bool RDStation::systemMaint() const { return RDBool(RDGetSqlValue("STATIONS","NAME",station_name,"SYSTEM_MAINT"). toString()); }
QString RDStation::defaultName() const { return RDGetSqlValue("STATIONS","NAME",station_name,"DEFAULT_NAME"). toString(); }
int RDStation::cardOutputs(int cardnum) const { return RDGetSqlValue("STATIONS","NAME",station_name, QString().sprintf("CARD%d_OUTPUTS",cardnum)).toInt(); }
unsigned RDStation::cueStopCart() const { return RDGetSqlValue("STATIONS","NAME",station_name,"CUE_STOP_CART").toUInt(); }
int RDStation::cuePort() const { return RDGetSqlValue("STATIONS","NAME",station_name,"CUE_PORT").toInt(); }
int RDStation::cueCard() const { return RDGetSqlValue("STATIONS","NAME",station_name,"CUE_CARD").toInt(); }
QString RDStation::jackCommandLine() const { return RDGetSqlValue("STATIONS","NAME",station_name,"JACK_COMMAND_LINE"). toString(); }
QString RDStation::cardName(int cardnum) const { return RDGetSqlValue("STATIONS","NAME",station_name, QString().sprintf("CARD%d_NAME",cardnum)).toString(); }
int RDStation::cartSlotRows() const { return RDGetSqlValue("STATIONS","NAME",station_name,"CARTSLOT_ROWS").toInt(); }
QString RDStation::userName() const { return RDGetSqlValue("STATIONS","NAME",station_name,"USER_NAME").toString(); }
bool RDStation::enableDragdrop() const { return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "ENABLE_DRAGDROP").toString()); }
int RDStation::cartSlotColumns() const { return RDGetSqlValue("STATIONS","NAME",station_name,"CARTSLOT_COLUMNS"). toInt(); }
bool RDStation::enforcePanelSetup() const { return RDBool(RDGetSqlValue("STATIONS","NAME",station_name, "ENFORCE_PANEL_SETUP").toString()); }