move BWF header options into Configuration option, rationalize crossfade parameter...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 20 Oct 2006 16:50:46 +0000 (16:50 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 20 Oct 2006 16:50:46 +0000 (16:50 +0000)
git-svn-id: svn://localhost/ardour2/trunk@996 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/audio_streamview.cc
gtk2_ardour/editor_actions.cc
libs/ardour/ardour/audiofilesource.h
libs/ardour/ardour/configuration_vars.h
libs/ardour/audio_playlist.cc
libs/ardour/audiofilesource.cc
libs/ardour/crossfade.cc
libs/ardour/sndfilesource.cc

index 0e6997b59c15f9b9e1e52a73fdf0601f32b1f922..24924fec4f91d17aef40549aebf6cbcaba76b4c8 100644 (file)
@@ -288,7 +288,7 @@ AudioStreamView::add_crossfade (Crossfade *crossfade)
        crossfade->Invalidated.connect (mem_fun (*this, &AudioStreamView::remove_crossfade));
        crossfade_views.push_back (cv);
 
-       if (!Config->get_crossfades_visible() || !crossfades_visible) {
+       if (!Config->get_xfades_visible() || !crossfades_visible) {
                cv->hide ();
        }
 }
index 6fb895004738b3dc80e8fda2cf274be107d3203c..0485f4cc8a5b79022ad57045e409d383c2e4b3bd 100644 (file)
@@ -782,13 +782,13 @@ Editor::toggle_auto_xfade ()
 void
 Editor::toggle_xfades_active ()
 {
-       ActionManager::toggle_config_state ("Editor", "toggle-xfades-active", &Configuration::set_crossfades_active, &Configuration::get_crossfades_active);
+       ActionManager::toggle_config_state ("Editor", "toggle-xfades-active", &Configuration::set_xfades_active, &Configuration::get_xfades_active);
 }
 
 void
 Editor::toggle_xfade_visibility ()
 {
-       ActionManager::toggle_config_state ("Editor", "toggle-xfades-visibility", &Configuration::set_crossfades_visible, &Configuration::get_crossfades_visible);
+       ActionManager::toggle_config_state ("Editor", "toggle-xfades-visibility", &Configuration::set_xfades_visible, &Configuration::get_xfades_visible);
 }
 
 void
@@ -811,12 +811,14 @@ Editor::parameter_changed (const char* parameter_name)
                update_just_smpte ();
        } else if (PARAM_IS ("video-pullup")) {
                update_video_pullup ();
-       } else if (PARAM_IS ("crossfades-active")) {
-               ActionManager::map_some_state ("Editor", "toggle-xfades-active", &Configuration::get_crossfades_active);
-       } else if (PARAM_IS ("crossfades-visible")) {
-               ActionManager::map_some_state ("Editor", "toggle-xfades-visible", &Configuration::get_crossfades_visible);
+       } else if (PARAM_IS ("xfades-active")) {
+               ActionManager::map_some_state ("Editor", "toggle-xfades-active", &Configuration::get_xfades_active);
+       } else if (PARAM_IS ("xfades-visible")) {
+               ActionManager::map_some_state ("Editor", "toggle-xfades-visible", &Configuration::get_xfades_visible);
        } else if (PARAM_IS ("auto-xfade")) {
                ActionManager::map_some_state ("Editor", "toggle-auto-xfades", &Configuration::get_auto_xfade);
+       } else if (PARAM_IS ("xfade-model")) {
+               update_crossfade_model ();
        } else if (PARAM_IS ("edit-mode")) {
                edit_mode_selector.set_active_text (edit_mode_to_string (Config->get_edit_mode()));
        }
index de12cb05e585f31705da48e7422ffbdbfbfc1af5..53e27b1df901780329e14b135490fd92969ab826 100644 (file)
@@ -81,8 +81,6 @@ class AudioFileSource : public AudioSource {
        void   mark_take (string);
        string take_id() const { return _take_id; }
 
-       static void set_bwf_country_code (string x);
-       static void set_bwf_organization_code (string x);
        static void set_bwf_serial_number (int);
        
        static void set_search_path (string);
index 92ca659eac7bc160a69275f42389b50b0794a4b4..fe65e9d4336f61d88e2790b323229c5f1b1f8a34 100644 (file)
@@ -48,8 +48,8 @@ CONFIG_VARIABLE (bool, use_overlap_equivalency, "use-overlap-equivalency", true)
 CONFIG_VARIABLE (CrossfadeModel, xfade_model, "xfade-model", FullCrossfade)
 CONFIG_VARIABLE (bool, auto_xfade, "auto-xfade", true)
 CONFIG_VARIABLE (float, short_xfade_seconds, "short-xfade-seconds", 0.015)
-CONFIG_VARIABLE (bool, crossfades_active, "crossfades-active", true)
-CONFIG_VARIABLE (bool, crossfades_visible, "crossfades-visible", true)
+CONFIG_VARIABLE (bool, xfades_active, "xfades-active", true)
+CONFIG_VARIABLE (bool, xfades_visible, "xfades-visible", true)
 CONFIG_VARIABLE (uint32_t, destructive_xfade_msecs,  "destructive-xfade-msecs", 2)
 
 /* editing related */
@@ -121,6 +121,11 @@ CONFIG_VARIABLE (bool, verify_remove_last_capture, "verify-remove-last-capture",
 CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
 CONFIG_VARIABLE (bool, use_vst, "use-vst", true)
 
+/* BWAV */
+
+CONFIG_VARIABLE (string, bwf_country_code, "bwf-country-code", "US")
+CONFIG_VARIABLE (string, bwf_organization_code, "bwf-organization-code", "US")
+
 /* these variables have custom set() methods (e.g. path globbing) */
 
 CONFIG_VARIABLE_SPECIAL(std::string, raid_path, "raid-path", "", path_expand)
index 00c3038d255042177f28dce7d90da8ab82ceeb3b..be8680882f86baf199df01f84f0d52db142d760a 100644 (file)
@@ -419,7 +419,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh)
                                        
                                } else {
 
-                                       xfade = new Crossfade (other, region, Config->get_xfade_model(), Config->get_crossfades_active());
+                                       xfade = new Crossfade (other, region, Config->get_xfade_model(), Config->get_xfades_active());
                                        add_crossfade (*xfade);
                                }
                        } 
index 0eb416e90505efba83b9f69871922bb626636ec9..77709e3a3cb58294ac6c29c42937ae3921cbabe4 100644 (file)
@@ -59,10 +59,6 @@ string AudioFileSource::search_path;
 sigc::signal<void> AudioFileSource::HeaderPositionOffsetChanged;
 uint64_t           AudioFileSource::header_position_offset = 0;
 
-/* XXX turn this into a Config option */
-char   AudioFileSource::bwf_country_code[3] = "US";
-/* XXX turn this into a Config option */
-char   AudioFileSource::bwf_organization_code[4] = "LAS";
 /* XXX maybe this too */
 char   AudioFileSource::bwf_serial_number[13] = "000000000000";
 
index 1c4bdb6cad2fd9dc5ccc7accc455e86e8d9ad8a4..50e3ff290570f35af27b3282ef5ba4ce2547bf0b 100644 (file)
@@ -92,7 +92,7 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<Audio
                _follow_overlap = true;
        }
 
-       _active = Config->get_crossfades_active ();
+       _active = Config->get_xfades_active ();
        _fixed = true;
                
        initialize ();
index c30b1af2a4548af95a372466aa44739970992553..1e408e12bc701c1b80944831d353920f2653db0f 100644 (file)
@@ -442,8 +442,8 @@ SndFileSource::setup_broadcast_info (nframes_t when, struct tm& now, time_t tnow
        int random_code = random() % 999999999;
        
        snprintf (_broadcast_info->originator_reference, sizeof (_broadcast_info->originator_reference), "%2s%3s%12s%02d%02d%02d%9d",
-                 bwf_country_code,
-                 bwf_organization_code,
+                 Config->get_bwf_country_code().c_str(),
+                 Config->get_bwf_organization_code().c_str(),
                  bwf_serial_number,
                  now.tm_hour,
                  now.tm_min,