+void MainWindow::eq_knob_changed(unsigned bus_index, EQBand band, int value)
+{
+ float gain_db = value * 0.1f;
+ global_mixer->get_audio_mixer()->set_eq(bus_index, band, gain_db);
+
+ update_eq_label(bus_index, band, gain_db);
+}
+
+void MainWindow::update_eq_label(unsigned bus_index, EQBand band, float gain_db)
+{
+ Ui::AudioExpandedView *view = audio_expanded_views[bus_index];
+ string db_string = format_db(gain_db, DB_WITH_SIGN);
+ switch (band) {
+ case EQ_BAND_TREBLE:
+ view->treble_label->setText(QString::fromStdString("Treble: " + db_string));
+ break;
+ case EQ_BAND_MID:
+ view->mid_label->setText(QString::fromStdString("Mid: " + db_string));
+ break;
+ case EQ_BAND_BASS:
+ view->bass_label->setText(QString::fromStdString("Bass: " + db_string));
+ break;
+ default:
+ assert(false);
+ }
+}
+