Tolerate LV2 plugins that call persist/file state functions early.
git-svn-id: svn://localhost/ardour2/branches/3.0@9343 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
036174daf1
commit
852232ad27
|
@ -428,7 +428,9 @@ LV2Plugin::lv2_files_abstract_path(LV2_Files_Host_Data host_data,
|
|||
const char* absolute_path)
|
||||
{
|
||||
LV2Plugin* me = (LV2Plugin*)host_data;
|
||||
assert(me->_insert_id != PBD::ID("0"));
|
||||
if (me->_insert_id == PBD::ID("0")) {
|
||||
return g_strdup(absolute_path);
|
||||
}
|
||||
|
||||
const std::string state_dir = Glib::build_filename(me->_session.plugins_dir(),
|
||||
me->_insert_id.to_s());
|
||||
|
@ -452,7 +454,9 @@ LV2Plugin::lv2_files_absolute_path(LV2_Files_Host_Data host_data,
|
|||
const char* abstract_path)
|
||||
{
|
||||
LV2Plugin* me = (LV2Plugin*)host_data;
|
||||
assert(me->_insert_id != PBD::ID("0"));
|
||||
if (me->_insert_id == PBD::ID("0")) {
|
||||
return g_strdup(abstract_path);
|
||||
}
|
||||
|
||||
char* ret = NULL;
|
||||
if (g_path_is_absolute(abstract_path)) {
|
||||
|
@ -477,7 +481,9 @@ LV2Plugin::lv2_files_new_file_path(LV2_Files_Host_Data host_data,
|
|||
const char* relative_path)
|
||||
{
|
||||
LV2Plugin* me = (LV2Plugin*)host_data;
|
||||
assert(me->_insert_id != PBD::ID("0"));
|
||||
if (me->_insert_id == PBD::ID("0")) {
|
||||
return g_strdup(relative_path);
|
||||
}
|
||||
|
||||
const std::string state_dir = Glib::build_filename(me->_session.plugins_dir(),
|
||||
me->_insert_id.to_s());
|
||||
|
|
|
@ -68,7 +68,7 @@ Processor::Processor(Session& session, const string& name)
|
|||
, _configured(false)
|
||||
, _display_to_user (true)
|
||||
, _pre_fader (false)
|
||||
, _ui_pointer (0)
|
||||
, _ui_pointer (0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ Processor::Processor (const Processor& other)
|
|||
, _configured(false)
|
||||
, _display_to_user (true)
|
||||
, _pre_fader (false)
|
||||
, _ui_pointer (0)
|
||||
, _ui_pointer (0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ Processor::state (bool full_state)
|
|||
stringstream sstr;
|
||||
for (set<Evoral::Parameter>::iterator x = _visible_controls.begin();
|
||||
x != _visible_controls.end(); ++x) {
|
||||
|
||||
|
||||
if (x != _visible_controls.begin()) {
|
||||
sstr << ' ';
|
||||
}
|
||||
|
@ -298,5 +298,5 @@ Processor::set_pre_fader (bool p)
|
|||
void
|
||||
Processor::set_ui (void* p)
|
||||
{
|
||||
_ui_pointer = p;
|
||||
_ui_pointer = p;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user