Less choppy peak bars
Update the sample rate to 144 to keep up with high refresh rate monitors.
This commit is contained in:
parent
8c20afdaec
commit
eba9ca6898
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "pavucontrol.h"
|
||||
|
||||
#define PEAKS_RATE 144
|
||||
|
||||
class MinimalStreamWidget : public Gtk::VBox {
|
||||
public:
|
||||
MinimalStreamWidget(BaseObjectType* cobject);
|
||||
|
|
Loading…
Reference in New Issue