mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-06 20:23:08 +00:00
Added microVu on conference + updated linphone to fix conference pause/resume
This commit is contained in:
parent
b0350122c5
commit
3ce3a5cc64
3 changed files with 55 additions and 2 deletions
|
|
@ -116,6 +116,30 @@ bool ConferenceModel::getRecording () const {
|
|||
return mRecording;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#define VU_MIN (-20.f)
|
||||
#define VU_MAX (4.f)
|
||||
|
||||
inline float computeVu (float volume) {
|
||||
if (volume < VU_MIN)
|
||||
return 0.f;
|
||||
if (volume > VU_MAX)
|
||||
return 1.f;
|
||||
|
||||
return (volume - VU_MIN) / (VU_MAX - VU_MIN);
|
||||
}
|
||||
|
||||
#undef VU_MIN
|
||||
#undef VU_MAX
|
||||
|
||||
float ConferenceModel::getMicroVu () const {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
return computeVu(core->getConferenceLocalInputVolume());
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void ConferenceModel::leave() {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
core->leaveConference();
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ class ConferenceModel : public QSortFilterProxyModel {
|
|||
Q_PROPERTY(int count READ getCount NOTIFY countChanged);
|
||||
|
||||
Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
|
||||
Q_PROPERTY(float microVu READ getMicroVu CONSTANT);
|
||||
|
||||
Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
|
||||
Q_PROPERTY(bool isInConf READ isInConference NOTIFY conferenceChanged);
|
||||
|
||||
|
|
@ -67,6 +69,7 @@ private:
|
|||
|
||||
bool getMicroMuted () const;
|
||||
void setMicroMuted (bool status);
|
||||
float getMicroVu () const;
|
||||
|
||||
bool isInConference () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -189,14 +189,40 @@ Rectangle {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: CallStyle.actionArea.height
|
||||
|
||||
RowLayout {
|
||||
GridLayout {
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: CallStyle.actionArea.leftButtonsGroupMargin
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
spacing: ActionBarStyle.spacing
|
||||
columns: incall.width < CallStyle.actionArea.lowWidth ? 2 : 4
|
||||
rowSpacing: ActionBarStyle.spacing
|
||||
|
||||
Row {
|
||||
spacing: CallStyle.actionArea.vu.spacing
|
||||
|
||||
VuMeter {
|
||||
Timer {
|
||||
interval: 50
|
||||
repeat: true
|
||||
running: micro.enabled
|
||||
|
||||
onTriggered: parent.value = conference.conferenceModel.microVu
|
||||
}
|
||||
|
||||
enabled: micro.enabled
|
||||
}
|
||||
|
||||
ActionSwitch {
|
||||
id: micro
|
||||
|
||||
icon: 'micro'
|
||||
iconSize: CallStyle.actionArea.iconSize
|
||||
|
||||
onClicked: conference.conferenceModel.microMuted = !conference.conferenceModel.microMuted
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ActionBar {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue