Skip to content

Commit

Permalink
Set media playback offset slider to range to 10000
Browse files Browse the repository at this point in the history
Disable volume control if SpeexDSP does not have AGC enabled.

Setup buddies.
  • Loading branch information
bear101 committed Sep 17, 2024
1 parent b7529b3 commit d0e2c6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Client/qtTeamTalk/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ MainWindow::MainWindow(const QString& cfgfile)
ui.statusbar->addPermanentWidget(m_dtxprogress);
ui.statusbar->addPermanentWidget(m_pinglabel);
ui.statusbar->addPermanentWidget(m_pttlabel);
ui.playbackOffsetSlider->setMaximum(MEDIAFILE_SLIDER_MAXIMUM);


#if defined(Q_OS_WIN32)
Expand Down Expand Up @@ -6420,7 +6421,7 @@ void MainWindow::slotUpdateMediaTabUI()
switch (m_mfp.audioPreprocessor.nPreprocessor)
{
case SPEEXDSP_AUDIOPREPROCESSOR :
ui.mediaVolumeSlider->setEnabled(true);
ui.mediaVolumeSlider->setEnabled(m_mfp.audioPreprocessor.speexdsp.bEnableAGC);
ui.mediaVolumeSlider->setRange(SPEEXDSP_AGC_GAINLEVEL_MIN, SPEEXDSP_AGC_GAINLEVEL_MAX);
ui.mediaVolumeSlider->setValue(m_mfp.audioPreprocessor.speexdsp.nGainLevel);
ui.mediaVolumeLabel->setText(tr("%1 %").arg(100 * m_mfp.audioPreprocessor.speexdsp.nGainLevel / DEFAULT_SPEEXDSP_AGC_GAINLEVEL));
Expand Down
9 changes: 9 additions & 0 deletions Client/qtTeamTalk/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,9 @@
<property name="text">
<string>Elapsed</string>
</property>
<property name="buddy">
<cstring>playbackOffsetSlider</cstring>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -564,6 +567,9 @@
<property name="text">
<string>Playback</string>
</property>
<property name="buddy">
<cstring>playMediaFileButton</cstring>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -624,6 +630,9 @@
<property name="text">
<string>Volume</string>
</property>
<property name="buddy">
<cstring>mediaVolumeSlider</cstring>
</property>
</widget>
</item>
<item>
Expand Down

0 comments on commit d0e2c6e

Please sign in to comment.