Basic support for 7.1/HI/VI audio tracks.
authorCarl Hetherington <cth@carlh.net>
Thu, 20 Feb 2014 10:08:58 +0000 (10:08 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 20 Feb 2014 10:08:58 +0000 (10:08 +0000)
ChangeLog
src/lib/film.cc
src/lib/util.cc
src/lib/util.h
src/wx/audio_mapping_view.cc

index 9f05f852f4633b76b42d83b9a09327a1e7322745..8e5c6a8a3bdab4b9f0c89689ebb9eea339dbcb08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-20  Carl Hetherington  <cth@carlh.net>
+
+       * Basic support for 7.1 / HI/VI audio tracks.
+
 2014-02-19  Carl Hetherington  <cth@carlh.net>
 
        * Add some basic JSON stuff.
index 8690d3ee0b97eb22e1080337ff4d7e1b27c88746..f772730015479268f48ccc3fbbb42f03cd756f4a 100644 (file)
@@ -106,7 +106,7 @@ Film::Film (boost::filesystem::path dir)
        , _j2k_bandwidth (Config::instance()->default_j2k_bandwidth ())
        , _dci_metadata (Config::instance()->default_dci_metadata ())
        , _video_frame_rate (24)
-       , _audio_channels (MAX_AUDIO_CHANNELS)
+       , _audio_channels (6)
        , _three_d (false)
        , _sequence_video (true)
        , _interop (false)
index a86033e572f7655f5ebc67e5195e04018c4aa358..25fbc130b1be445a3e71df42459f4433970568e1 100644 (file)
@@ -790,10 +790,11 @@ video_frames_to_audio_frames (VideoContent::Frame v, float audio_sample_rate, fl
 string
 audio_channel_name (int c)
 {
-       assert (MAX_AUDIO_CHANNELS == 6);
+       assert (MAX_AUDIO_CHANNELS == 8);
 
        /* TRANSLATORS: these are the names of audio channels; Lfe (sub) is the low-frequency
-          enhancement channel (sub-woofer).
+          enhancement channel (sub-woofer).  HI is the hearing-impaired audio track and
+          VI is the visually-impaired audio track (audio describe).
        */
        string const channels[] = {
                _("Left"),
@@ -802,6 +803,8 @@ audio_channel_name (int c)
                _("Lfe (sub)"),
                _("Left surround"),
                _("Right surround"),
+               _("HI"),
+               _("VI")
        };
 
        return channels[c];
index 9bf139b8278f3de2143c531c5fac6e23704434c3..ef29cc08f27f3ff411d74904b99632d70548cda1 100644 (file)
@@ -49,7 +49,7 @@ extern "C" {
 #undef check
 
 /** The maximum number of audio channels that we can cope with */
-#define MAX_AUDIO_CHANNELS 6
+#define MAX_AUDIO_CHANNELS 8
 
 #define DCPOMATIC_HELLO "Boys, you gotta learn not to talk to nuns that way"
 
index c08da091241b2c92e75dbd0c159d3688fccda9fb..fe32192610afc0a6afb853526d4a8d863fbb7614 100644 (file)
@@ -271,6 +271,10 @@ AudioMappingView::set_column_labels ()
        int const c = _grid->GetNumberCols ();
        
        _grid->SetColLabelValue (0, _("Content channel"));
+
+#if MAX_AUDIO_CHANNELS != 8
+#warning AudioMappingView::set_column_labels() is expecting the wrong MAX_AUDIO_CHANNELS
+#endif 
        
        if (c > 0) {
                _grid->SetColLabelValue (1, _("L"));
@@ -296,6 +300,14 @@ AudioMappingView::set_column_labels ()
                _grid->SetColLabelValue (6, _("Rs"));
        }
 
+       if (c > 6) {
+               _grid->SetColLabelValue (7, _("HI"));
+       }
+
+       if (c > 7) {
+               _grid->SetColLabelValue (8, _("VI"));
+       }
+       
        _grid->AutoSize ();
 }