Change the -3dB preset to -6dB since we are dealing with amplitude, not power.
authorCarl Hetherington <cth@carlh.net>
Tue, 3 Jun 2014 13:36:00 +0000 (14:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 3 Jun 2014 13:36:00 +0000 (14:36 +0100)
ChangeLog
src/wx/audio_mapping_view.cc
src/wx/audio_mapping_view.h

index 07c985c47b7aa4c842c97ef8f5652bf42cafb64d..dfcf699c0b84c9932c64d0e3a3ed1966502fe121 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 
        * Re-calculate audio plots when the mapping is changed.
 
+       * Change the -3dB preset to -6dB since we are talking about
+       amplitude, not power.
+
        * Version 1.69.19 released.
 
 2014-06-02  Carl Hetherington  <cth@carlh.net>
index c1f3e2067a150a3e4790468700103034a74d29f8..d59c4ae07fdd2a37c9c5ab9d1b9bfc268c702c54 100644 (file)
@@ -39,7 +39,7 @@ using boost::lexical_cast;
 enum {
        ID_off = 1,
        ID_full = 2,
-       ID_minus3dB = 3,
+       ID_minus6dB = 3,
        ID_edit = 4
 };
 
@@ -130,12 +130,12 @@ AudioMappingView::AudioMappingView (wxWindow* parent)
        _menu = new wxMenu;
        _menu->Append (ID_off, _("Off"));
        _menu->Append (ID_full, _("Full"));
-       _menu->Append (ID_minus3dB, _("-3dB"));
+       _menu->Append (ID_minus6dB, _("-6dB"));
        _menu->Append (ID_edit, _("Edit..."));
 
        Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&AudioMappingView::off, this), ID_off);
        Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&AudioMappingView::full, this), ID_full);
-       Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&AudioMappingView::minus3dB, this), ID_minus3dB);
+       Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&AudioMappingView::minus6dB, this), ID_minus6dB);
        Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&AudioMappingView::edit, this), ID_edit);
 }
 
@@ -192,9 +192,9 @@ AudioMappingView::full ()
 }
 
 void
-AudioMappingView::minus3dB ()
+AudioMappingView::minus6dB ()
 {
-       _map.set (_menu_row, static_cast<libdcp::Channel> (_menu_column - 1), 1 / sqrt (2));
+       _map.set (_menu_row, static_cast<libdcp::Channel> (_menu_column - 1), pow (10, -6.0 / 20));
        map_changed ();
 }
 
index 26f1746e09bbeb9c73d86a6c1ce761bc36efa81c..98375eb9e3c071b6b83d23fe332e2a7988fb8dcf 100644 (file)
@@ -42,7 +42,7 @@ private:
 
        void off ();
        void full ();
-       void minus3dB ();
+       void minus6dB ();
        void edit ();
 
        wxGrid* _grid;