2018-05-22 Fred Gleason <fredg@paravelsystems.com>

* Increased 'RD_MAX_STREAMS' to 48.
	* Modified caed(8) to start JACK clients after a 5 second delay.
This commit is contained in:
Fred Gleason 2018-05-22 12:56:45 +00:00
parent 94119b27d7
commit a65a8f4643
4 changed files with 36 additions and 22 deletions

View File

@ -16891,3 +16891,6 @@
* Changed the title of the 'Configure Audio Ports' dialog to
'Configure AudioScience Audio Ports' on the 'Edit Host' dialog
in rdadmin(1).
2018-05-22 Fred Gleason <fredg@paravelsystems.com>
* Increased 'RD_MAX_STREAMS' to 48.
* Modified caed(8) to start JACK clients after a 5 second delay.

View File

@ -220,6 +220,7 @@ class MainObject : public QObject
void jackStopTimerData(int stream);
void jackFadeTimerData(int stream);
void jackRecordTimerData(int stream);
void jackClientStartData();
private:
void jackInit(RDStation *station);
@ -285,6 +286,7 @@ class MainObject : public QObject
QTimer *jack_fade_timer[RD_MAX_STREAMS];
QTimer *jack_stop_timer[RD_MAX_STREAMS];
QTimer *jack_record_timer[RD_MAX_PORTS];
QTimer *jack_client_start_timer;
int jack_offset[RD_MAX_STREAMS];
int jack_clock_phase;
unsigned jack_samples_recorded[RD_MAX_STREAMS];

View File

@ -414,11 +414,34 @@ void MainObject::jackRecordTimerData(int stream)
}
void MainObject::jackClientStartData()
{
QString sql=QString("select DESCRIPTION,COMMAND_LINE from JACK_CLIENTS where ")+
"STATION_NAME=\""+RDEscapeString(rd_config->stationName())+"\"";
RDSqlQuery *q=new RDSqlQuery(sql);
while(q->next()) {
QStringList fields=QStringList().split(" ",q->value(1).toString());
jack_clients.push_back(new QProcess(fields,this));
if(jack_clients.back()->start()) {
LogLine(RDConfig::LogDebug,"started JACK Client \""+
q->value(0).toString()+"\"");
}
else {
LogLine(RDConfig::LogWarning,"failed to start JACK Client \""+
q->value(0).toString()+"\" ["+
q->value(1).toString()+"]");
}
sleep(1);
}
delete q;
}
void MainObject::jackInit(RDStation *station)
{
#ifdef JACK
QString sql;
RDSqlQuery *q;
// QString sql;
// RDSqlQuery *q;
jack_options_t jackopts=JackNullOption;
jack_status_t jackstat=JackFailure;
RDConfig::LogPriority prio=RDConfig::LogDebug;
@ -540,24 +563,10 @@ void MainObject::jackInit(RDStation *station)
//
// Start JACK Clients
//
sql=QString("select DESCRIPTION,COMMAND_LINE from JACK_CLIENTS where ")+
"STATION_NAME=\""+RDEscapeString(station->name())+"\"";
q=new RDSqlQuery(sql);
while(q->next()) {
QStringList fields=QStringList().split(" ",q->value(1).toString());
jack_clients.push_back(new QProcess(fields,this));
if(jack_clients.back()->start()) {
LogLine(RDConfig::LogDebug,"started JACK Client \""+
q->value(0).toString()+"\"");
}
else {
LogLine(RDConfig::LogWarning,"failed to start JACK Client \""+
q->value(0).toString()+"\" ["+
q->value(1).toString()+"]");
}
sleep(1);
}
delete q;
jack_client_start_timer=new QTimer(this);
connect(jack_client_start_timer,SIGNAL(timeout()),
this,SLOT(jackClientStartData()));
jack_client_start_timer->start(6000,true);
//
// Tell the database about us

View File

@ -2,7 +2,7 @@
//
// System-Wide Values for Rivendell
//
// (C) Copyright 2002-2016 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@ -133,7 +133,7 @@
/*
* Max number of possible audio streams/card/type
*/
#define RD_MAX_STREAMS 16
#define RD_MAX_STREAMS 48
/*
* Max number of possible audio ports/card/type