[vlc-devel] [PATCH 2/3] audio_filter: SOFAlizer new module (GUI)

Wolfgang Hrauda wolfgang.hrauda at gmx.at
Tue May 12 12:33:02 CEST 2015


This patch adds the GUI for SOFAlizer. See PATCH 1 for more information on this audio filter module.
---
 modules/gui/qt4/components/extended_panels.cpp | 21 +++++++++++++++++++++
 modules/gui/qt4/components/extended_panels.hpp |  8 ++++++++
 modules/gui/qt4/dialogs/extended.cpp           |  4 ++++
 3 files changed, 33 insertions(+)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index d05c0b3..2218a84 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1439,6 +1439,27 @@ Spatializer::Spatializer( intf_thread_t *p_intf, QWidget *parent )
     build();
 }
 
+/**********************************************************************
+ * SOFAlizer
+ **********************************************************************/
+
+Sofalizer::Sofalizer( intf_thread_t *p_intf, QWidget *parent )
+    : AudioFilterControlWidget( p_intf, parent, "sofalizer" )
+{
+    i_smallfont = -1;
+    const FilterSliderData::slider_data_t a[6] =
+    {
+        { "sofalizer-select",   qtr("Select File"),    "", 1.0f, 3.0f, 1.0f, 1.0f, 1.0f },
+        { "sofalizer-gain",   qtr("Gain"),    qtr("dB"), -20.0f, 40.0f, 0.0f, 1.0f, 1.0f },
+        { "sofalizer-switch",   qtr("Switch"),    "", 0.0f , 4.0f, 0.0f, 1.0f, 1.0f },
+        { "sofalizer-rotation",  qtr("Rotation"),   qtr("deg"), -180.0f, 180.0f, 0.0f, 1.0f, 1.0f },
+        { "sofalizer-elevation",  qtr("Elevation"),   qtr("deg"), -90, 90, 0, 1.0f, 1.0f },
+        { "sofalizer-radius",  qtr("Radius"),   qtr("m"), 0.1f , 2.1f, 1.0f, 0.1f, 1.0f },
+    };
+    for( int i=0; i<6 ;i++ ) controls.append( a[i] );
+    build();
+}
+
 #include <QToolButton>
 #include <QGridLayout>
 
diff --git a/modules/gui/qt4/components/extended_panels.hpp b/modules/gui/qt4/components/extended_panels.hpp
index 006d602..317dc7a 100644
--- a/modules/gui/qt4/components/extended_panels.hpp
+++ b/modules/gui/qt4/components/extended_panels.hpp
@@ -204,6 +204,14 @@ public:
     Spatializer( intf_thread_t *, QWidget * );
 };
 
+class Sofalizer: public AudioFilterControlWidget
+{
+     Q_OBJECT
+
+public:
+     Sofalizer( intf_thread_t *, QWidget * );
+};
+
 class SyncWidget : public QWidget
 {
     Q_OBJECT
diff --git a/modules/gui/qt4/dialogs/extended.cpp b/modules/gui/qt4/dialogs/extended.cpp
index 05750cb..83da418 100644
--- a/modules/gui/qt4/dialogs/extended.cpp
+++ b/modules/gui/qt4/dialogs/extended.cpp
@@ -70,6 +70,9 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf )
     audioTab->addTab( spatial, qtr( "Spatializer" ) );
     audioLayout->addWidget( audioTab );
 
+    Sofalizer *sofalizer = new Sofalizer( p_intf, audioTab );
+    audioTab->addTab( sofalizer, qtr( "SOFAlizer" ) );
+
     mainTabW->insertTab( AUDIO_TAB, audioWidget, qtr( "Audio Effects" ) );
 
     /* Video Effects */
@@ -103,6 +106,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf )
     CONNECT( writeChangesBox, toggled(bool), compres, setSaveToConfig(bool) );
     CONNECT( writeChangesBox, toggled(bool), spatial, setSaveToConfig(bool) );
     CONNECT( writeChangesBox, toggled(bool), equal, setSaveToConfig(bool) );
+    CONNECT( writeChangesBox, toggled(bool), sofalizer, setSaveToConfig(bool) );
     CONNECT( mainTabW, currentChanged(int), this, currentTabChanged(int) );
 
     QDialogButtonBox *closeButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
-- 
1.9.1




More information about the vlc-devel mailing list