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