mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 15:09:33 -05:00
moved abSpeech audio bar to main panel
This commit is contained in:
parent
d7ecd775eb
commit
d3f75234a7
@ -202,7 +202,16 @@
|
|||||||
<item row="4" column="0" colspan="2">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QWidget" name="qwVAD" native="true">
|
<widget class="QWidget" name="qwVAD" native="true">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||||
* *
|
* *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "AudioStats.h"
|
#include "AudioStats.h"
|
||||||
#include "VOIPConfigPanel.h"
|
#include "VOIPConfigPanel.h"
|
||||||
@ -92,19 +91,15 @@ VOIPConfigPanel::VOIPConfigPanel(QWidget * parent, Qt::WindowFlags flags)
|
|||||||
|
|
||||||
inputAudioProcessor = NULL;
|
inputAudioProcessor = NULL;
|
||||||
inputAudioDevice = NULL;
|
inputAudioDevice = NULL;
|
||||||
abSpeech = NULL;
|
|
||||||
qtTick = NULL;
|
qtTick = NULL;
|
||||||
|
|
||||||
ui.qcbTransmit->addItem(tr("Continuous"), RsVOIP::AudioTransmitContinous);
|
ui.qcbTransmit->addItem(tr("Continuous"), RsVOIP::AudioTransmitContinous);
|
||||||
ui.qcbTransmit->addItem(tr("Voice Activity"), RsVOIP::AudioTransmitVAD);
|
ui.qcbTransmit->addItem(tr("Voice Activity"), RsVOIP::AudioTransmitVAD);
|
||||||
ui.qcbTransmit->addItem(tr("Push To Talk"), RsVOIP::AudioTransmitPushToTalk);
|
ui.qcbTransmit->addItem(tr("Push To Talk"), RsVOIP::AudioTransmitPushToTalk);
|
||||||
|
|
||||||
abSpeech = new AudioBar();
|
ui.abSpeech->qcBelow = Qt::red;
|
||||||
abSpeech->qcBelow = Qt::red;
|
ui.abSpeech->qcInside = Qt::yellow;
|
||||||
abSpeech->qcInside = Qt::yellow;
|
ui.abSpeech->qcAbove = Qt::green;
|
||||||
abSpeech->qcAbove = Qt::green;
|
|
||||||
//abSpeech->setGeometry(9,20,50,10);
|
|
||||||
ui.qwVadLayout_2->addWidget(abSpeech,0,0,1,0);
|
|
||||||
|
|
||||||
connect( ui.qsTransmitHold, SIGNAL( valueChanged ( int ) ), this, SLOT( on_qsTransmitHold_valueChanged(int) ) );
|
connect( ui.qsTransmitHold, SIGNAL( valueChanged ( int ) ), this, SLOT( on_qsTransmitHold_valueChanged(int) ) );
|
||||||
connect( ui.qsNoise, SIGNAL( valueChanged ( int ) ), this, SLOT( on_qsNoise_valueChanged(int) ) );
|
connect( ui.qsNoise, SIGNAL( valueChanged ( int ) ), this, SLOT( on_qsNoise_valueChanged(int) ) );
|
||||||
@ -332,16 +327,16 @@ void VOIPConfigPanel::on_Tick_timeout()
|
|||||||
{
|
{
|
||||||
// update the sound capture bar
|
// update the sound capture bar
|
||||||
|
|
||||||
abSpeech->iBelow = ui.qsTransmitMin->value();
|
ui.abSpeech->iBelow = ui.qsTransmitMin->value();
|
||||||
abSpeech->iAbove = ui.qsTransmitMax->value();
|
ui.abSpeech->iAbove = ui.qsTransmitMax->value();
|
||||||
|
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
rsVOIP->setVoipfVADmin(ui.qsTransmitMin->value());
|
rsVOIP->setVoipfVADmin(ui.qsTransmitMin->value());
|
||||||
rsVOIP->setVoipfVADmax(ui.qsTransmitMax->value());
|
rsVOIP->setVoipfVADmax(ui.qsTransmitMax->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
abSpeech->iValue = iroundf(inputAudioProcessor->dVoiceAcivityLevel * 32767.0f + 0.5f);
|
ui.abSpeech->iValue = iroundf(inputAudioProcessor->dVoiceAcivityLevel * 32767.0f + 0.5f);
|
||||||
abSpeech->update();
|
ui.abSpeech->update();
|
||||||
|
|
||||||
// also transmit encoded video
|
// also transmit encoded video
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* *
|
* *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#pragma once
|
#pragma once
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QAudioInput>
|
#include <QAudioInput>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
@ -46,9 +45,9 @@ private:
|
|||||||
voipGraphSource *_src ;
|
voipGraphSource *_src ;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "ui_AudioInputConfig.h"
|
#include "ui_VOIPConfigPanel.h"
|
||||||
|
|
||||||
class VOIPConfigPanel : public ConfigPage
|
class VOIPConfigPanel : public ConfigPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<item row="1" column="0" colspan="3">
|
<item row="1" column="0" colspan="3">
|
||||||
<widget class="QStackedWidget" name="qswTransmit">
|
<widget class="QStackedWidget" name="qswTransmit">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="qwPTT">
|
<widget class="QWidget" name="qwPTT">
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
@ -242,13 +242,39 @@
|
|||||||
<string>Audio</string>
|
<string>Audio</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="qliNoise">
|
<widget class="QLabel" name="qlAmp">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Noise Suppression</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="qliAmp">
|
||||||
|
<property name="text">
|
||||||
|
<string>Amplification</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>qsNoise</cstring>
|
<cstring>qsAmp</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="qlNoise">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -277,26 +303,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="qlNoise">
|
<widget class="QCheckBox" name="qcbEchoCancel">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>Echo Cancellation Processing</string>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="qliAmp">
|
<widget class="QLabel" name="qliNoise">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Amplification</string>
|
<string>Noise Suppression</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>qsAmp</cstring>
|
<cstring>qsNoise</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -322,28 +345,8 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="3" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="qlAmp">
|
<widget class="AudioBar" name="abSpeech" native="true"/>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>30</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="qcbEchoCancel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Echo Cancellation Processing</string>
|
|
||||||
</property>
|
|
||||||
<property name="tristate">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -459,7 +462,13 @@
|
|||||||
<customwidget>
|
<customwidget>
|
||||||
<class>voipGraph</class>
|
<class>voipGraph</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
<header>gui/AudioInputConfig.h</header>
|
<header>gui/VOIPConfigPanel.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>AudioBar</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>gui/AudioStats.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
|
Loading…
Reference in New Issue
Block a user