Fix crash with clap plugins without MIDI input
[carla.git] / source / backend / plugin / CarlaPluginAU.cpp
blob1252858c7ead32830150b583726f2b11d9a8f636
1 /*
2 * Carla AU Plugin
3 * Copyright (C) 2014-2020 Filipe Coelho <falktx@falktx.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * For a full copy of the GNU General Public License see the doc/GPL.txt file.
18 #include "CarlaPlugin.hpp"
19 #include "CarlaEngine.hpp"
20 #include "CarlaUtils.hpp"
22 CARLA_BACKEND_START_NAMESPACE
24 // -------------------------------------------------------------------------------------------------------------------
26 CarlaPluginPtr CarlaPlugin::newAU(const Initializer& init)
28 carla_debug("CarlaPlugin::newAU({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})",
29 init.engine, init.filename, init.name, init.label, init.uniqueId);
31 #if defined(CARLA_OS_MAC)
32 return newJuce(init, "AU");
33 #else
34 init.engine->setLastError("AU support not available");
35 return nullptr;
36 #endif
39 // -------------------------------------------------------------------------------------------------------------------
41 CARLA_BACKEND_END_NAMESPACE