13
0

move BWF header options into Configuration option, rationalize crossfade parameter names, ensure full GUI display of crossfade parameters (in menus)

git-svn-id: svn://localhost/ardour2/trunk@996 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-10-20 16:50:46 +00:00
parent 502057064c
commit 3e577fee98
8 changed files with 20 additions and 19 deletions

View 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 ();
}
}

View 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()));
}

View 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);

View 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)

View 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);
}
}

View 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";

View 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 ();

View 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,