[pulseaudio-commits] [Git][pulseaudio/pavucontrol][master] Less choppy peak bars
Arun Raghavan (@arun)
gitlab at gitlab.freedesktop.org
Fri Jun 23 12:23:58 UTC 2023
Arun Raghavan pushed to branch master at PulseAudio / pavucontrol
Commits:
eba9ca68 by warmos at 2023-06-23T08:21:08-04:00
Less choppy peak bars
Update the sample rate to 144 to keep up with high refresh rate
monitors.
- - - - -
3 changed files:
- src/mainwindow.cc
- src/minimalstreamwidget.cc
- src/minimalstreamwidget.h
Changes:
=====================================
src/mainwindow.cc
=====================================
@@ -666,7 +666,7 @@ pa_stream* MainWindow::createMonitorStreamForSource(uint32_t source_idx, uint32_
ss.channels = 1;
ss.format = PA_SAMPLE_FLOAT32;
- ss.rate = 25;
+ ss.rate = PEAKS_RATE;
memset(&attr, 0, sizeof(attr));
attr.fragsize = sizeof(float);
=====================================
src/minimalstreamwidget.cc
=====================================
@@ -61,7 +61,7 @@ void MinimalStreamWidget::init() {
peakProgressBar.hide();
}
-#define DECAY_STEP .04
+#define DECAY_STEP (1.0 / PEAKS_RATE)
void MinimalStreamWidget::updatePeak(double v) {
=====================================
src/minimalstreamwidget.h
=====================================
@@ -23,6 +23,8 @@
#include "pavucontrol.h"
+#define PEAKS_RATE 144
+
class MinimalStreamWidget : public Gtk::VBox {
public:
MinimalStreamWidget(BaseObjectType* cobject);
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/eba9ca6898c4883b88f80dbb83c5002fd19492b8
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/eba9ca6898c4883b88f80dbb83c5002fd19492b8
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20230623/9189c235/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list