2023-10-17 Fred Gleason <fredg@paravelsystems.com>

* Modified rdcatchd(8) to use the new-style CAE commands for play-out
	events.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-10-17 10:35:48 -04:00
parent cbe8f583b6
commit d434fad6f8
5 changed files with 16 additions and 34 deletions

View File

@ -24461,3 +24461,6 @@
2023-10-16 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'end-pos' parameter from the 'Start Playback' CAE
command.
2023-10-17 Fred Gleason <fredg@paravelsystems.com>
* Modified rdcatchd(8) to use the new-style CAE commands for play-out
events.

View File

@ -142,8 +142,6 @@ void DeckMon::enableMonitorButton(bool state)
void DeckMon::processCatchEvent(RDCatchEvent *evt)
{
// printf("processCatchEvent(): %s\n",evt->dump().toUtf8().constData());
QList<RDCatchMeterLevel> meter_levels;
if(evt->hostName()==mon_station) {

View File

@ -219,6 +219,18 @@ MainObject::MainObject(QObject *parent)
this,SLOT(playbackStoppedData(int)));
rda->syslog(LOG_DEBUG,"starting CAE connection");
rda->cae()->connectToHost();
QList<int> cards;
sql=QString("select `CARD_NUMBER` from `DECKS` where ")+
"`STATION_NAME`='"+RDEscapeString(rda->station()->name())+"' && "+
"`CARD_NUMBER`>=0";
q=new RDSqlQuery(sql);
while(q->next()) {
if(!cards.contains(q->value(0).toInt())) {
cards.push_back(q->value(0).toInt());
}
}
delete q;
rda->cae()->enableMetering(&cards);
//
// Sound Initialization
@ -804,29 +816,6 @@ void MainObject::engineData(int id)
}
void MainObject::caeConnectedData(bool state)
{
if(state) {
QList<int> cards;
QString sql=QString("select `CARD_NUMBER` from `DECKS` where ")+
"`STATION_NAME`='"+RDEscapeString(rda->station()->name())+"' && "+
"`CARD_NUMBER`>=0";
RDSqlQuery *q=new RDSqlQuery(sql);
while(q->next()) {
if(!cards.contains(q->value(0).toInt())) {
cards.push_back(q->value(0).toInt());
}
}
delete q;
rda->cae()->enableMetering(&cards);
}
if(!state) {
rda->syslog(LOG_ERR,"aborting - unable to connect to Core AudioEngine");
exit(1);
}
}
void MainObject::recordLoadedData(int card,int stream)
{
int deck=GetRecordDeck(card,stream);
@ -1550,7 +1539,6 @@ void MainObject::LoadEngine(bool adv_day)
rda->syslog(LOG_DEBUG,"rdcatchd engine load starts...");
sql=LoadEventSql()+QString(" where `STATION_NAME`='")+
RDEscapeString(rda->station()->name())+"'";
rda->syslog(LOG_NOTICE,"%s",sql.toUtf8().constData());
q=new RDSqlQuery(sql);
while(q->next()) {
catch_events.push_back(CatchEvent(rda->station(),RDConfiguration()));
@ -1761,7 +1749,6 @@ void MainObject::LoadDeckList()
catch_playout_deck_status[i]=RDDeck::Recording;
}
else {
// rda->cae()->stopPlay(catch_playout_handle[i]);
catch_playout_deck_status[i]=RDDeck::Offline;
}
}

View File

@ -65,17 +65,12 @@ class MainObject : public QObject
void startTimerData(int id);
void offsetTimerData(int id);
void engineData(int);
void caeConnectedData(bool state);
void recordLoadedData(int card,int stream);
void recordingData(int card,int stream);
void recordStoppedData(int card,int stream);
void recordUnloadedData(int card,int stream,unsigned msecs);
// void playLoadedData(int handle);
// void playingData(int handle);
void playStartedData(int serial);
// void playStoppedData(int handle);
void playbackStoppedData(int serial);
// void playUnloadedData(int handle);
void runCartData(int chan,int number,unsigned cartnum);
void meterData();
void eventFinishedData(int id);
@ -178,7 +173,6 @@ class MainObject : public QObject
int catch_playout_card[MAX_DECKS];
int catch_playout_stream[MAX_DECKS];
int catch_playout_port[MAX_DECKS];
// int catch_playout_handle[MAX_DECKS];
int catch_playout_serials[MAX_DECKS];
RDDeck::Status catch_playout_deck_status[MAX_DECKS];
int catch_playout_event_id[MAX_DECKS];