From dca515c135555e044f0ae125d68a64b5b76696cb Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sat, 6 Feb 2021 13:12:19 -0500 Subject: [PATCH] 2021-02-06 Fred Gleason * Removed the 'RDHPISoundSelector' widget. Signed-off-by: Fred Gleason --- ChangeLog | 2 ++ rdhpi/Makefile.am | 7 ++-- rdhpi/rdhpi.pro | 4 +-- rdhpi/rdhpisoundselector.cpp | 69 ------------------------------------ rdhpi/rdhpisoundselector.h | 65 --------------------------------- 5 files changed, 5 insertions(+), 142 deletions(-) delete mode 100644 rdhpi/rdhpisoundselector.cpp delete mode 100644 rdhpi/rdhpisoundselector.h diff --git a/ChangeLog b/ChangeLog index 89d4428f..973f15b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21046,3 +21046,5 @@ * Removed the 'Q3Url' dependencies from rdrepld(8). 2021-02-06 Fred Gleason * Removed dead code from rdcastmanager(1). +2021-02-06 Fred Gleason + * Removed the 'RDHPISoundSelector' widget. diff --git a/rdhpi/Makefile.am b/rdhpi/Makefile.am index cf7f74ab..19b26d05 100644 --- a/rdhpi/Makefile.am +++ b/rdhpi/Makefile.am @@ -53,14 +53,11 @@ lib_LTLIBRARIES = librdhpi.la dist_librdhpi_la_SOURCES = rdhpiinformation.cpp rdhpiinformation.h\ rdhpiplaystream.cpp rdhpiplaystream.h\ rdhpirecordstream.cpp rdhpirecordstream.h\ - rdhpisoundcard.cpp rdhpisoundcard.h\ - rdhpisoundselector.cpp rdhpisoundselector.h + rdhpisoundcard.cpp rdhpisoundcard.h nodist_librdhpi_la_SOURCES = moc_rdhpiplaystream.cpp\ moc_rdhpirecordstream.cpp\ - moc_rdhpisoundcard.cpp\ - moc_rdhpisoundselector.cpp - + moc_rdhpisoundcard.cpp librdhpi_la_LDFLAGS = -release $(VERSION) diff --git a/rdhpi/rdhpi.pro b/rdhpi/rdhpi.pro index 9724e50e..87cef565 100644 --- a/rdhpi/rdhpi.pro +++ b/rdhpi/rdhpi.pro @@ -2,7 +2,7 @@ # # The rdhpi/ QMake project file for Rivendell. # -# (C) Copyright 2003-2007,2016 Fred Gleason +# (C) Copyright 2003-2021 Fred Gleason # # 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 @@ -28,13 +28,11 @@ SOURCES += rdhpiinformation.cpp SOURCES += rdhpiplaystream.cpp SOURCES += rdhpirecordstream.cpp SOURCES += rdhpisoundcard.cpp -SOURCES += rdhpisoundselector.cpp HEADERS += rdhpiinformation.h HEADERS += rdhpiplaystream.h HEADERS += rdhpirecordstream.h HEADERS += rdhpisoundcard.h -HEADERS += rdhpisoundselector.h TRANSLATIONS += rdhpi_cs.ts TRANSLATIONS += rdhpi_de.ts diff --git a/rdhpi/rdhpisoundselector.cpp b/rdhpi/rdhpisoundselector.cpp deleted file mode 100644 index f4e3b3fc..00000000 --- a/rdhpi/rdhpisoundselector.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// rdhpisoundselector.cpp -// -// A selection widget for audio devices. -// -// (C) Copyright 2002-2007,2016 Fred Gleason -// -// 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 -// published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - - -RDHPISoundSelector::RDHPISoundSelector(RDHPISoundCard::DeviceClass dev_class, - RDConfig *config,QWidget *parent) - :Q3ListBox(parent) -{ - sound_card=new RDHPISoundCard(config,this); - - if(dev_class==RDHPISoundCard::PlayDevice) { - for(int i=0;igetCardQuantity();i++) { - for(int j=0;jgetCardOutputPorts(i);j++) { - insertItem(sound_card->getOutputPortDescription(i,j), - i*HPI_MAX_NODES+j); - } - } - } - if(dev_class==RDHPISoundCard::RecordDevice) { - for(int i=0;igetCardQuantity();i++) { - for(int j=0;jgetCardInputPorts(i);j++) { - insertItem(sound_card->getInputPortDescription(i,j), - i*HPI_MAX_NODES+j); - } - } - } - connect(this,SIGNAL(highlighted(int)),this,SLOT(selection(int))); -} - - -void RDHPISoundSelector::selection(int selection) -{ - emit changed(selection/HPI_MAX_ADAPTERS, - selection-HPI_MAX_ADAPTERS*(selection/HPI_MAX_ADAPTERS)); - emit cardChanged(selection/HPI_MAX_ADAPTERS); - emit portChanged(selection-HPI_MAX_ADAPTERS*(selection/HPI_MAX_ADAPTERS)); -} diff --git a/rdhpi/rdhpisoundselector.h b/rdhpi/rdhpisoundselector.h deleted file mode 100644 index 03d6c44c..00000000 --- a/rdhpi/rdhpisoundselector.h +++ /dev/null @@ -1,65 +0,0 @@ -// rdhpisoundselector.h -// -// A selection widget for audio devices. -// -// (C) Copyright 2002-2019 Fred Gleason -// -// 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 -// published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#ifndef RDHPISOUNDSELECTOR_H -#define RDHPISOUNDSELECTOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "rdhpisoundcard.h" - -#ifdef ALSA -#include -#endif // HPI - -#ifdef JACK -#include -#endif // JACK - -class RDHPISoundSelector : public Q3ListBox -{ - Q_OBJECT - - public: - RDHPISoundSelector(RDHPISoundCard::DeviceClass dev_class,RDConfig *config, - QWidget *parent=0); - - signals: - void changed(int card,int port); - void cardChanged(int card); - void portChanged(int port); - - private slots: - void selection(int selection); - - private: - RDHPISoundCard *sound_card; -}; - - -#endif // RDHPISOUNDSELECTOR_H