mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Use separate plugin-cache for Apple/M1
Plugins on Apple can be multi-arch (Intel + ARM), or AUs may be bridged by Rosetta. A user can also run Intel binary of Ardour or M1 binary on M1 CPUs on macOS. Each can see different plugins - notably VST3 plugins that are Intel only can be scanned using the Intel binary, but are later not available with the M1 build.
This commit is contained in:
parent
b8c3f9342a
commit
fac6d6bf98
3 changed files with 17 additions and 1 deletions
|
|
@ -418,7 +418,11 @@ discover_auv2 (CAComponentDescription& desc, std::vector<ARDOUR::AUv2Info>& rv,
|
||||||
static string
|
static string
|
||||||
auv2_info_cache_dir ()
|
auv2_info_cache_dir ()
|
||||||
{
|
{
|
||||||
|
#ifdef __aarch64__
|
||||||
|
string dir = Glib::build_filename (ARDOUR::user_cache_directory (), "auv2-arm64");
|
||||||
|
#else
|
||||||
string dir = Glib::build_filename (ARDOUR::user_cache_directory (), "auv2");
|
string dir = Glib::build_filename (ARDOUR::user_cache_directory (), "auv2");
|
||||||
|
#endif
|
||||||
/* if the directory doesn't exist, try to create it */
|
/* if the directory doesn't exist, try to create it */
|
||||||
if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
|
if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
|
||||||
if (g_mkdir (dir.c_str (), 0700)) {
|
if (g_mkdir (dir.c_str (), 0700)) {
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,11 @@ std::string PluginManager::vst3_scanner_bin_path = "";
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AUV2_BLACKLIST "auv2_blacklist.txt"
|
#ifdef __aarch64__
|
||||||
|
# define AUV2_BLACKLIST "auv2_a64_blacklist.txt"
|
||||||
|
#else
|
||||||
|
# define AUV2_BLACKLIST "auv2_blacklist.txt"
|
||||||
|
#endif
|
||||||
|
|
||||||
PluginManager&
|
PluginManager&
|
||||||
PluginManager::instance()
|
PluginManager::instance()
|
||||||
|
|
@ -1945,7 +1949,11 @@ void
|
||||||
PluginManager::clear_vst3_cache ()
|
PluginManager::clear_vst3_cache ()
|
||||||
{
|
{
|
||||||
#ifdef VST3_SUPPORT
|
#ifdef VST3_SUPPORT
|
||||||
|
# if defined __APPLE__ && defined __aarch64__
|
||||||
|
string dn = Glib::build_filename (ARDOUR::user_cache_directory(), "vst-arm64");
|
||||||
|
# else
|
||||||
string dn = Glib::build_filename (ARDOUR::user_cache_directory(), "vst");
|
string dn = Glib::build_filename (ARDOUR::user_cache_directory(), "vst");
|
||||||
|
# endif
|
||||||
vector<string> v3i_files;
|
vector<string> v3i_files;
|
||||||
find_files_matching_regex (v3i_files, dn, "\\.v3i$", false);
|
find_files_matching_regex (v3i_files, dn, "\\.v3i$", false);
|
||||||
for (vector<string>::iterator i = v3i_files.begin(); i != v3i_files.end (); ++i) {
|
for (vector<string>::iterator i = v3i_files.begin(); i != v3i_files.end (); ++i) {
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,11 @@ ARDOUR::module_path_vst3 (string const& path)
|
||||||
static string
|
static string
|
||||||
vst3_info_cache_dir ()
|
vst3_info_cache_dir ()
|
||||||
{
|
{
|
||||||
|
#if defined __APPLE__ && defined __aarch64__
|
||||||
|
string dir = Glib::build_filename (ARDOUR::user_cache_directory (), "vst-arm64");
|
||||||
|
#else
|
||||||
string dir = Glib::build_filename (ARDOUR::user_cache_directory (), "vst");
|
string dir = Glib::build_filename (ARDOUR::user_cache_directory (), "vst");
|
||||||
|
#endif
|
||||||
/* if the directory doesn't exist, try to create it */
|
/* if the directory doesn't exist, try to create it */
|
||||||
if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
|
if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
|
||||||
if (g_mkdir (dir.c_str (), 0700)) {
|
if (g_mkdir (dir.c_str (), 0700)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue