mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 07:31:19 +02:00
2023-10-16 Fred Gleason <fredg@paravelsystems.com>
* Added a 'volume' parameter to the 'Start Playback' CAE command. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -156,9 +156,9 @@ MainObject::MainObject(QObject *parent)
|
||||
connect(cae_server,SIGNAL(playPositionReq(const SessionId &,int)),
|
||||
this,SLOT(playPositionData(const SessionId &,int)));
|
||||
connect(cae_server,SIGNAL(startPlaybackReq(const SessionId &,const QString &,
|
||||
unsigned,unsigned,int,int,int)),
|
||||
unsigned,unsigned,int,int,int,int)),
|
||||
this,SLOT(startPlaybackData(const SessionId &,const QString &,
|
||||
unsigned,unsigned,int,int,int)));
|
||||
unsigned,unsigned,int,int,int,int)));
|
||||
connect(cae_server,SIGNAL(playStopReq(const SessionId &)),
|
||||
this,SLOT(stopPlaybackData(const SessionId &)));
|
||||
connect(cae_server,SIGNAL(loadPlaybackReq(int,unsigned,const QString &)),
|
||||
@@ -353,7 +353,8 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed)
|
||||
int start_pos,int end_pos,int speed,
|
||||
int volume)
|
||||
{
|
||||
Driver *dvr=NULL;
|
||||
|
||||
@@ -388,7 +389,7 @@ void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
//
|
||||
// Set Mixer
|
||||
//
|
||||
if(!dvr->setOutputVolume(cardnum,streamnum,portnum,0)) {
|
||||
if(!dvr->setOutputVolume(cardnum,streamnum,portnum,volume)) {
|
||||
rda->syslog(LOG_WARNING,"set output volume failed - session: %s card: %d port: %d stream: %d level: 0",
|
||||
sid.dump().toUtf8().constData(),cardnum,portnum,streamnum);
|
||||
}
|
||||
|
@@ -77,7 +77,7 @@ class MainObject : public QObject
|
||||
//
|
||||
void startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed);
|
||||
int start_pos,int end_pos,int speed,int volume);
|
||||
void playPositionData(const SessionId &sid,int position);
|
||||
void stopPlaybackData(const SessionId &sid);
|
||||
|
||||
|
@@ -148,6 +148,7 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
int channels;
|
||||
int bitrate;
|
||||
int interval;
|
||||
int volume;
|
||||
SessionId origin(src_addr,src_port);
|
||||
|
||||
//
|
||||
@@ -186,7 +187,7 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
//
|
||||
// Playback Operations
|
||||
//
|
||||
if((f0.at(0)=="PY")&&(f0.size()==8)) { // Start Playback
|
||||
if((f0.at(0)=="PY")&&(f0.size()==9)) { // Start Playback
|
||||
serial=f0.at(1).toUInt(&ok);
|
||||
if(ok) {
|
||||
origin.setSerialNumber(serial);
|
||||
@@ -202,9 +203,12 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
if(ok&&(end_pos>=0)&&(end_pos>=start_pos)) {
|
||||
speed=f0.at(7).toInt(&ok);
|
||||
if(ok&&(speed>0)) {
|
||||
emit startPlaybackReq(origin,cutname,cardnum,portnum,
|
||||
start_pos,end_pos,speed);
|
||||
was_processed=true;
|
||||
volume=f0.at(8).toInt(&ok);
|
||||
if(ok) {
|
||||
emit startPlaybackReq(origin,cutname,cardnum,portnum,
|
||||
start_pos,end_pos,speed,volume);
|
||||
was_processed=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ class CaeServer : public QObject
|
||||
void connectionClosed(const SessionId &sid);
|
||||
void startPlaybackReq(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed);
|
||||
int start_pos,int end_pos,int speed,int volume);
|
||||
void playPositionReq(const SessionId &sid,int position);
|
||||
void playPauseReq(const SessionId &sid);
|
||||
void playResumeReq(const SessionId &sid);
|
||||
|
Reference in New Issue
Block a user