p += preset_search_path;
preset_search_path = p;
preset_search_path_initialized = true;
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose("AU Preset Path: %1\n", preset_search_path));
}
init ();
string name = CFStringRefToStdString (preset->presetName);
factory_preset_map[name] = preset->presetNumber;
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose("AU Factory Preset: %1 > %2\n", name, preset->presetNumber));
}
CFRelease (presets);
// Plugin::setup_controls ();
- au_blacklist(CFStringRefToStdString(itemName));
+ au_unblacklist(CFStringRefToStdString(itemName));
if (itemName != NULL) CFRelease(itemName);
}
user_preset_map[preset_name] = user_preset_path;;
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose("AU Saving Preset to %1\n", user_preset_path));
+
return string ("file:///") + user_preset_path;
}
find_files_matching_filter (preset_files, preset_search_path, au_preset_filter, this, true, true, true);
if (preset_files.empty()) {
+ DEBUG_TRACE (DEBUG::AudioUnits, "AU No Preset Files found for given plugin.\n");
return;
}
if (check_and_get_preset_name (get_comp()->Comp(), path, preset_name)) {
user_preset_map[preset_name] = path;
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose("AU Preset File: %1 > %2\n", preset_name, path));
+ } else {
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose("AU INVALID Preset: %1 > %2\n", preset_name, path));
}
}
for (UserPresetMap::iterator i = user_preset_map.begin(); i != user_preset_map.end(); ++i) {
_presets.insert (make_pair (i->second, Plugin::PresetRecord (i->second, i->first)));
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose("AU Adding User Preset: %1 > %2\n", i->first, i->second));
}
/* add factory presets */
/* XXX: dubious */
string const uri = string_compose ("%1", _presets.size ());
_presets.insert (make_pair (uri, Plugin::PresetRecord (uri, i->first, i->second)));
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose("AU Adding Factory Preset: %1 > %2\n", i->first, i->second));
}
}
assert(!_crashlog_fd);
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("Creating AU Log: %1\n", fn));
if (!(_crashlog_fd = fopen(fn.c_str(), "w"))) {
- PBD::error << "Cannot create AU error-log\n";
+ PBD::error << "Cannot create AU error-log" << fn << "\n";
+ cerr << "Cannot create AU error-log" << fn << "\n";
}
}
void
AUPluginInfo::au_crashlog (std::string msg)
{
- assert(_crashlog_fd);
- fprintf(_crashlog_fd, "AU: %s\n", msg.c_str());
- ::fflush(_crashlog_fd);
+ if (!_crashlog_fd) {
+ fprintf(stderr, "AU: %s\n", msg.c_str());
+ } else {
+ fprintf(_crashlog_fd, "AU: %s\n", msg.c_str());
+ ::fflush(_crashlog_fd);
+ }
}
void