mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-16 16:47:43 +02:00
2019-11-27 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdcatchd(8) that broke audio metering.
This commit is contained in:
parent
7f79536887
commit
e8754d8377
@ -19274,3 +19274,5 @@
|
|||||||
2019-11-26 Fred Gleason <fredg@paravelsystems.com>
|
2019-11-26 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a regression in rdcatch(1) that caused the 'Source' dropdown
|
* Fixed a regression in rdcatch(1) that caused the 'Source' dropdown
|
||||||
in the 'Edit Recording' dialog to fail to be populated properly.
|
in the 'Edit Recording' dialog to fail to be populated properly.
|
||||||
|
2019-11-27 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a regression in rdcatchd(8) that broke audio metering.
|
||||||
|
@ -123,10 +123,10 @@ void RDCae::connectHost()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RDCae::enableMetering(std::vector<int> *cards)
|
void RDCae::enableMetering(QList<int> *cards)
|
||||||
{
|
{
|
||||||
QString cmd=QString().sprintf("ME %u",cae_meter_socket->port());
|
QString cmd=QString().sprintf("ME %u",cae_meter_socket->port());
|
||||||
for(unsigned i=0;i<cards->size();i++) {
|
for(int i=0;i<cards->size();i++) {
|
||||||
if(cards->at(i)>=0) {
|
if(cards->at(i)>=0) {
|
||||||
bool found=false;
|
bool found=false;
|
||||||
for(unsigned j=0;j<i;j++) {
|
for(unsigned j=0;j<i;j++) {
|
||||||
|
10
lib/rdcae.h
10
lib/rdcae.h
@ -21,13 +21,11 @@
|
|||||||
#ifndef RDCAE_H
|
#ifndef RDCAE_H
|
||||||
#define RDCAE_H
|
#define RDCAE_H
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <qsqldatabase.h>
|
|
||||||
#include <qstring.h>
|
|
||||||
#include <qobject.h>
|
|
||||||
#include <q3socketdevice.h>
|
#include <q3socketdevice.h>
|
||||||
|
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
|
#include <qobject.h>
|
||||||
|
#include <qlist.h>
|
||||||
|
|
||||||
#include <rd.h>
|
#include <rd.h>
|
||||||
#include <rdcmd_cache.h>
|
#include <rdcmd_cache.h>
|
||||||
@ -45,7 +43,7 @@ class RDCae : public QObject
|
|||||||
RDCae(RDStation *station,RDConfig *config,QObject *parent=0);
|
RDCae(RDStation *station,RDConfig *config,QObject *parent=0);
|
||||||
~RDCae();
|
~RDCae();
|
||||||
void connectHost();
|
void connectHost();
|
||||||
void enableMetering(std::vector<int> *cards);
|
void enableMetering(QList<int> *cards);
|
||||||
bool loadPlay(int card,QString name,int *stream,int *handle);
|
bool loadPlay(int card,QString name,int *stream,int *handle);
|
||||||
void unloadPlay(int handle);
|
void unloadPlay(int handle);
|
||||||
void positionPlay(int handle,int pos);
|
void positionPlay(int handle,int pos);
|
||||||
|
@ -787,7 +787,7 @@ QSizePolicy MainWidget::sizePolicy() const
|
|||||||
|
|
||||||
void MainWidget::caeConnectedData(bool state)
|
void MainWidget::caeConnectedData(bool state)
|
||||||
{
|
{
|
||||||
std::vector<int> cards;
|
QList<int> cards;
|
||||||
|
|
||||||
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::MainLog1Channel));
|
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::MainLog1Channel));
|
||||||
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::MainLog2Channel));
|
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::MainLog2Channel));
|
||||||
|
@ -144,7 +144,7 @@ QSize MainWidget::sizeHint() const
|
|||||||
|
|
||||||
void MainWidget::caeConnectedData(bool state)
|
void MainWidget::caeConnectedData(bool state)
|
||||||
{
|
{
|
||||||
std::vector<int> cards;
|
QList<int> cards;
|
||||||
|
|
||||||
QString sql=QString("select CARD from CARTSLOTS where ")+
|
QString sql=QString("select CARD from CARTSLOTS where ")+
|
||||||
"STATION_NAME=\""+RDEscapeString(rda->config()->stationName())+"\"";
|
"STATION_NAME=\""+RDEscapeString(rda->config()->stationName())+"\"";
|
||||||
|
@ -868,6 +868,20 @@ void MainObject::garbageData()
|
|||||||
|
|
||||||
void MainObject::isConnectedData(bool state)
|
void MainObject::isConnectedData(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) {
|
if(!state) {
|
||||||
rda->syslog(LOG_ERR,"aborting - unable to connect to Core AudioEngine");
|
rda->syslog(LOG_ERR,"aborting - unable to connect to Core AudioEngine");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -516,7 +516,7 @@ QSizePolicy MainWidget::sizePolicy() const
|
|||||||
void MainWidget::caeConnectedData(bool state)
|
void MainWidget::caeConnectedData(bool state)
|
||||||
{
|
{
|
||||||
if(state) {
|
if(state) {
|
||||||
std::vector<int> cards;
|
QList<int> cards;
|
||||||
cards.push_back(rda->libraryConf()->inputCard());
|
cards.push_back(rda->libraryConf()->inputCard());
|
||||||
cards.push_back(rda->libraryConf()->outputCard());
|
cards.push_back(rda->libraryConf()->outputCard());
|
||||||
rda->cae()->enableMetering(&cards);
|
rda->cae()->enableMetering(&cards);
|
||||||
|
@ -235,7 +235,7 @@ void MainWidget::connectedData(bool state)
|
|||||||
|
|
||||||
void MainWidget::caeConnectedData(bool state)
|
void MainWidget::caeConnectedData(bool state)
|
||||||
{
|
{
|
||||||
std::vector<int> cards;
|
QList<int> cards;
|
||||||
RDLogeditConf *conf=new RDLogeditConf(rda->config()->stationName());
|
RDLogeditConf *conf=new RDLogeditConf(rda->config()->stationName());
|
||||||
|
|
||||||
cards.push_back(conf->inputCard());
|
cards.push_back(conf->inputCard());
|
||||||
|
@ -296,7 +296,7 @@ QSizePolicy MainWidget::sizePolicy() const
|
|||||||
|
|
||||||
void MainWidget::caeConnectedData(bool state)
|
void MainWidget::caeConnectedData(bool state)
|
||||||
{
|
{
|
||||||
std::vector<int> cards;
|
QList<int> cards;
|
||||||
|
|
||||||
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::SoundPanel1Channel));
|
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::SoundPanel1Channel));
|
||||||
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::SoundPanel2Channel));
|
cards.push_back(rda->airplayConf()->card(RDAirPlayConf::SoundPanel2Channel));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user