mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-11 17:04:31 -05:00
renamed AudioInputConfig into VOIPConfigPanel
This commit is contained in:
parent
0de9c877b8
commit
c4fbd3a4f5
@ -86,9 +86,9 @@ QMAKE_CXXFLAGS += -D__STDC_CONSTANT_MACROS
|
|||||||
QMAKE_CXXFLAGS *= -Wall
|
QMAKE_CXXFLAGS *= -Wall
|
||||||
|
|
||||||
SOURCES = VOIPPlugin.cpp \
|
SOURCES = VOIPPlugin.cpp \
|
||||||
|
gui/VOIPConfigPanel.cpp \
|
||||||
services/p3VOIP.cc \
|
services/p3VOIP.cc \
|
||||||
services/rsVOIPItems.cc \
|
services/rsVOIPItems.cc \
|
||||||
gui/AudioInputConfig.cpp \
|
|
||||||
gui/AudioStats.cpp \
|
gui/AudioStats.cpp \
|
||||||
gui/AudioWizard.cpp \
|
gui/AudioWizard.cpp \
|
||||||
gui/SpeexProcessor.cpp \
|
gui/SpeexProcessor.cpp \
|
||||||
@ -102,9 +102,9 @@ SOURCES = VOIPPlugin.cpp \
|
|||||||
gui/VOIPToasterNotify.cpp
|
gui/VOIPToasterNotify.cpp
|
||||||
|
|
||||||
HEADERS = VOIPPlugin.h \
|
HEADERS = VOIPPlugin.h \
|
||||||
|
gui/VOIPConfigPanel.h \
|
||||||
services/p3VOIP.h \
|
services/p3VOIP.h \
|
||||||
services/rsVOIPItems.h \
|
services/rsVOIPItems.h \
|
||||||
gui/AudioInputConfig.h \
|
|
||||||
gui/AudioStats.h \
|
gui/AudioStats.h \
|
||||||
gui/AudioWizard.h \
|
gui/AudioWizard.h \
|
||||||
gui/SpeexProcessor.h \
|
gui/SpeexProcessor.h \
|
||||||
@ -118,9 +118,10 @@ HEADERS = VOIPPlugin.h \
|
|||||||
gui/VOIPToasterNotify.h \
|
gui/VOIPToasterNotify.h \
|
||||||
interface/rsVOIP.h
|
interface/rsVOIP.h
|
||||||
|
|
||||||
FORMS = gui/AudioInputConfig.ui \
|
FORMS = \
|
||||||
gui/AudioStats.ui \
|
gui/AudioStats.ui \
|
||||||
gui/AudioWizard.ui \
|
gui/AudioWizard.ui \
|
||||||
|
gui/VOIPConfigPanel.ui \
|
||||||
gui/VOIPToasterItem.ui
|
gui/VOIPToasterItem.ui
|
||||||
|
|
||||||
TARGET = VOIP
|
TARGET = VOIP
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "VOIPPlugin.h"
|
#include "VOIPPlugin.h"
|
||||||
#include "interface/rsVOIP.h"
|
#include "interface/rsVOIP.h"
|
||||||
|
|
||||||
#include "gui/AudioInputConfig.h"
|
#include "gui/VOIPConfigPanel.h"
|
||||||
#include "gui/VOIPChatWidgetHolder.h"
|
#include "gui/VOIPChatWidgetHolder.h"
|
||||||
#include "gui/VOIPGUIHandler.h"
|
#include "gui/VOIPGUIHandler.h"
|
||||||
#include "gui/VOIPNotify.h"
|
#include "gui/VOIPNotify.h"
|
||||||
@ -112,7 +112,7 @@ ConfigPage *VOIPPlugin::qt_config_page() const
|
|||||||
// The config pages are deleted when config is closed, so it's important not to static the
|
// The config pages are deleted when config is closed, so it's important not to static the
|
||||||
// created object.
|
// created object.
|
||||||
//
|
//
|
||||||
return new AudioInputConfig() ;
|
return new VOIPConfigPanel() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDialog *VOIPPlugin::qt_about_page() const
|
QDialog *VOIPPlugin::qt_about_page() const
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
#include "AudioStats.h"
|
#include "AudioStats.h"
|
||||||
#include "AudioInputConfig.h"
|
#include "VOIPConfigPanel.h"
|
||||||
//#include "Global.h"
|
//#include "Global.h"
|
||||||
//#include "smallft.h"
|
//#include "smallft.h"
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ voipGraph::voipGraph(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
AudioInputConfig::AudioInputConfig(QWidget * parent, Qt::WindowFlags flags)
|
VOIPConfigPanel::VOIPConfigPanel(QWidget * parent, Qt::WindowFlags flags)
|
||||||
: ConfigPage(parent, flags)
|
: ConfigPage(parent, flags)
|
||||||
{
|
{
|
||||||
std::cerr << "Creating audioInputConfig object" << std::endl;
|
std::cerr << "Creating audioInputConfig object" << std::endl;
|
||||||
@ -118,13 +118,13 @@ AudioInputConfig::AudioInputConfig(QWidget * parent, Qt::WindowFlags flags)
|
|||||||
QObject::connect(ui.availableBW_SB,SIGNAL(valueChanged(double)),this,SLOT(updateAvailableBW(double))) ;
|
QObject::connect(ui.availableBW_SB,SIGNAL(valueChanged(double)),this,SLOT(updateAvailableBW(double))) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::updateAvailableBW(double r)
|
void VOIPConfigPanel::updateAvailableBW(double r)
|
||||||
{
|
{
|
||||||
std::cerr << "Setting max bandwidth to " << r << " KB/s" << std::endl;
|
std::cerr << "Setting max bandwidth to " << r << " KB/s" << std::endl;
|
||||||
videoProcessor->setMaximumBandwidth((uint32_t)(r*1024)) ;
|
videoProcessor->setMaximumBandwidth((uint32_t)(r*1024)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::togglePreview(bool b)
|
void VOIPConfigPanel::togglePreview(bool b)
|
||||||
{
|
{
|
||||||
if(b)
|
if(b)
|
||||||
{
|
{
|
||||||
@ -138,7 +138,7 @@ void AudioInputConfig::togglePreview(bool b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioInputConfig::~AudioInputConfig()
|
VOIPConfigPanel::~VOIPConfigPanel()
|
||||||
{
|
{
|
||||||
disconnect( qtTick, SIGNAL( timeout ( ) ), this, SLOT( on_Tick_timeout() ) );
|
disconnect( qtTick, SIGNAL( timeout ( ) ), this, SLOT( on_Tick_timeout() ) );
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ AudioInputConfig::~AudioInputConfig()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Loads the settings for this page */
|
/** Loads the settings for this page */
|
||||||
void AudioInputConfig::load()
|
void VOIPConfigPanel::load()
|
||||||
{
|
{
|
||||||
//connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) );
|
//connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) );
|
||||||
//connect( ui.allowTunnelConnectionCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) );
|
//connect( ui.allowTunnelConnectionCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) );
|
||||||
@ -199,7 +199,7 @@ void AudioInputConfig::load()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AudioInputConfig::loadSettings() {
|
void VOIPConfigPanel::loadSettings() {
|
||||||
/*QList<QString> keys;
|
/*QList<QString> keys;
|
||||||
|
|
||||||
if (AudioInputRegistrar::qmNew)
|
if (AudioInputRegistrar::qmNew)
|
||||||
@ -258,7 +258,7 @@ void AudioInputConfig::loadSettings() {
|
|||||||
videoInput->start() ;
|
videoInput->start() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioInputConfig::save(QString &/*errmsg*/) {//mainly useless beacause saving occurs in realtime
|
bool VOIPConfigPanel::save(QString &/*errmsg*/) {//mainly useless beacause saving occurs in realtime
|
||||||
//s.iQuality = qsQuality->value();
|
//s.iQuality = qsQuality->value();
|
||||||
rsVOIP->setVoipiNoiseSuppress((ui.qsNoise->value() == 14) ? 0 : - ui.qsNoise->value());
|
rsVOIP->setVoipiNoiseSuppress((ui.qsNoise->value() == 14) ? 0 : - ui.qsNoise->value());
|
||||||
rsVOIP->setVoipiMinLoudness(20000 - ui.qsAmp->value());
|
rsVOIP->setVoipiMinLoudness(20000 - ui.qsAmp->value());
|
||||||
@ -272,14 +272,14 @@ bool AudioInputConfig::save(QString &/*errmsg*/) {//mainly useless beacause savi
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::on_qsTransmitHold_valueChanged(int v) {
|
void VOIPConfigPanel::on_qsTransmitHold_valueChanged(int v) {
|
||||||
float val = static_cast<float>(v * FRAME_SIZE);
|
float val = static_cast<float>(v * FRAME_SIZE);
|
||||||
val = val / SAMPLING_RATE;
|
val = val / SAMPLING_RATE;
|
||||||
ui.qlTransmitHold->setText(tr("%1 s").arg(val, 0, 'f', 2));
|
ui.qlTransmitHold->setText(tr("%1 s").arg(val, 0, 'f', 2));
|
||||||
rsVOIP->setVoipVoiceHold(v);
|
rsVOIP->setVoipVoiceHold(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::on_qsNoise_valueChanged(int v) {
|
void VOIPConfigPanel::on_qsNoise_valueChanged(int v) {
|
||||||
QPalette pal;
|
QPalette pal;
|
||||||
|
|
||||||
if (v < 15) {
|
if (v < 15) {
|
||||||
@ -292,19 +292,19 @@ void AudioInputConfig::on_qsNoise_valueChanged(int v) {
|
|||||||
rsVOIP->setVoipiNoiseSuppress(- ui.qsNoise->value());
|
rsVOIP->setVoipiNoiseSuppress(- ui.qsNoise->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::on_qsAmp_valueChanged(int v) {
|
void VOIPConfigPanel::on_qsAmp_valueChanged(int v) {
|
||||||
v = 20000 - v;
|
v = 20000 - v;
|
||||||
float d = 20000.0f/static_cast<float>(v);
|
float d = 20000.0f/static_cast<float>(v);
|
||||||
ui.qlAmp->setText(QString::fromLatin1("%1").arg(d, 0, 'f', 2));
|
ui.qlAmp->setText(QString::fromLatin1("%1").arg(d, 0, 'f', 2));
|
||||||
rsVOIP->setVoipiMinLoudness(20000 - ui.qsAmp->value());
|
rsVOIP->setVoipiMinLoudness(20000 - ui.qsAmp->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::on_qcbEchoCancel_clicked() {
|
void VOIPConfigPanel::on_qcbEchoCancel_clicked() {
|
||||||
rsVOIP->setVoipEchoCancel(ui.qcbEchoCancel->isChecked());
|
rsVOIP->setVoipEchoCancel(ui.qcbEchoCancel->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AudioInputConfig::on_qcbTransmit_currentIndexChanged(int v) {
|
void VOIPConfigPanel::on_qcbTransmit_currentIndexChanged(int v) {
|
||||||
switch (v) {
|
switch (v) {
|
||||||
case 0:
|
case 0:
|
||||||
ui.qswTransmit->setCurrentWidget(ui.qwContinuous);
|
ui.qswTransmit->setCurrentWidget(ui.qwContinuous);
|
||||||
@ -321,7 +321,7 @@ void AudioInputConfig::on_qcbTransmit_currentIndexChanged(int v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AudioInputConfig::on_Tick_timeout()
|
void VOIPConfigPanel::on_Tick_timeout()
|
||||||
{
|
{
|
||||||
if (!inputAudioProcessor)
|
if (!inputAudioProcessor)
|
||||||
{
|
{
|
||||||
@ -356,13 +356,13 @@ void AudioInputConfig::on_Tick_timeout()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::emptyBuffer() {
|
void VOIPConfigPanel::emptyBuffer() {
|
||||||
while(inputAudioProcessor->hasPendingPackets()) {
|
while(inputAudioProcessor->hasPendingPackets()) {
|
||||||
inputAudioProcessor->getNetworkPacket(); //that will purge the buffer
|
inputAudioProcessor->getNetworkPacket(); //that will purge the buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioInputConfig::on_qpbAudioWizard_clicked() {
|
void VOIPConfigPanel::on_qpbAudioWizard_clicked() {
|
||||||
AudioWizard aw(this);
|
AudioWizard aw(this);
|
||||||
aw.exec();
|
aw.exec();
|
||||||
loadSettings();
|
loadSettings();
|
@ -48,7 +48,7 @@ private:
|
|||||||
|
|
||||||
#include "ui_AudioInputConfig.h"
|
#include "ui_AudioInputConfig.h"
|
||||||
|
|
||||||
class AudioInputConfig : public ConfigPage
|
class VOIPConfigPanel : public ConfigPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -72,9 +72,9 @@ class AudioInputConfig : public ConfigPage
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/** Default Constructor */
|
/** Default Constructor */
|
||||||
AudioInputConfig(QWidget * parent = 0, Qt::WindowFlags flags = 0);
|
VOIPConfigPanel(QWidget * parent = 0, Qt::WindowFlags flags = 0);
|
||||||
/** Default Destructor */
|
/** Default Destructor */
|
||||||
~AudioInputConfig();
|
~VOIPConfigPanel();
|
||||||
|
|
||||||
/** Saves the changes on this page */
|
/** Saves the changes on this page */
|
||||||
virtual bool save(QString &errmsg);
|
virtual bool save(QString &errmsg);
|
Loading…
Reference in New Issue
Block a user