mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ARA: Fix ARA debug configuration
The ARA SDK's debug functionality is included in the audio_processors module, hence the configuration had to be moved there from juce_plugin_client.
This commit is contained in:
parent
2d30969b4e
commit
9d73008dc2
9 changed files with 94 additions and 86 deletions
|
|
@ -41,28 +41,4 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4100)
|
|||
JUCE_END_IGNORE_WARNINGS_MSVC
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
#if (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS) || JUCE_LOG_ASSERTIONS
|
||||
JUCE_API void JUCE_CALLTYPE handleARAAssertion (const char* file, const int line, const char* diagnosis) noexcept
|
||||
{
|
||||
#if (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS)
|
||||
DBG (diagnosis);
|
||||
#endif
|
||||
|
||||
logAssertion (file, line);
|
||||
|
||||
#if (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS)
|
||||
if (juce_isRunningUnderDebugger())
|
||||
JUCE_BREAK_IN_DEBUGGER;
|
||||
JUCE_ANALYZER_NORETURN
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
ARA_SETUP_DEBUG_MESSAGE_PREFIX(JucePlugin_Name);
|
||||
|
||||
} // namespace juce
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2022 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
Agreement and JUCE Privacy Policy.
|
||||
|
||||
End User License Agreement: www.juce.com/juce-7-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if JucePlugin_Enable_ARA
|
||||
// Configure ARA debug support prior to including ARA SDK headers
|
||||
namespace juce
|
||||
{
|
||||
|
||||
#if (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS) || JUCE_LOG_ASSERTIONS
|
||||
|
||||
#define ARA_ENABLE_INTERNAL_ASSERTS 1
|
||||
|
||||
extern JUCE_API void JUCE_CALLTYPE handleARAAssertion (const char* file, const int line, const char* diagnosis) noexcept;
|
||||
|
||||
#if !defined(ARA_HANDLE_ASSERT)
|
||||
#define ARA_HANDLE_ASSERT(file, line, diagnosis) juce::handleARAAssertion (file, line, diagnosis)
|
||||
#endif
|
||||
|
||||
#if JUCE_LOG_ASSERTIONS
|
||||
#define ARA_ENABLE_DEBUG_OUTPUT 1
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define ARA_ENABLE_INTERNAL_ASSERTS 0
|
||||
|
||||
#endif // (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS) || JUCE_LOG_ASSERTIONS
|
||||
|
||||
} // namespace juce
|
||||
|
||||
#endif
|
||||
|
|
@ -128,7 +128,3 @@
|
|||
#endif
|
||||
|
||||
#include "utility/juce_CreatePluginFilter.h"
|
||||
|
||||
#if JucePlugin_Enable_ARA
|
||||
#include "ARA/juce_ARA_Wrapper.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX))
|
||||
|
||||
#include <ARA_Library/Debug/ARADebug.h>
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#if (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX))
|
||||
|
||||
#include "juce_ARAHosting.h"
|
||||
#include <ARA_Library/Debug/ARADebug.h>
|
||||
|
||||
#include <ARA_Library/Dispatch/ARAHostDispatch.cpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@
|
|||
#include "utilities/juce_ParameterAttachments.h"
|
||||
#include "utilities/juce_AudioProcessorValueTreeState.h"
|
||||
#include "utilities/juce_PluginHostType.h"
|
||||
#include "utilities/ARA/juce_ARADebug.h"
|
||||
#include "utilities/ARA/juce_ARA_utils.h"
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#include <juce_core/system/juce_CompilerWarnings.h>
|
||||
#include <juce_core/system/juce_TargetPlatform.h>
|
||||
|
||||
#include "utilities/ARA/juce_ARADebug.h"
|
||||
|
||||
/* Having WIN32_LEAN_AND_MEAN defined at the point of including ARADebug.c will produce warnings.
|
||||
|
||||
To prevent such problems it's easiest to have it in its own translation unit.
|
||||
|
|
|
|||
67
modules/juce_audio_processors/utilities/ARA/juce_ARADebug.h
Normal file
67
modules/juce_audio_processors/utilities/ARA/juce_ARADebug.h
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2022 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
Agreement and JUCE Privacy Policy.
|
||||
|
||||
End User License Agreement: www.juce.com/juce-7-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <juce_core/system/juce_PlatformDefs.h>
|
||||
|
||||
#ifndef JUCE_API
|
||||
#define JUCE_API
|
||||
#endif
|
||||
|
||||
#if (JucePlugin_Enable_ARA || (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU))) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
//==============================================================================
|
||||
#if (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS) || JUCE_LOG_ASSERTIONS
|
||||
#define ARA_ENABLE_INTERNAL_ASSERTS 1
|
||||
#else
|
||||
#define ARA_ENABLE_INTERNAL_ASSERTS 0
|
||||
#endif // (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS) || JUCE_LOG_ASSERTIONS
|
||||
|
||||
//==============================================================================
|
||||
#if ARA_ENABLE_INTERNAL_ASSERTS
|
||||
|
||||
JUCE_API void JUCE_CALLTYPE handleARAAssertion (const char* file, const int line, const char* diagnosis) noexcept;
|
||||
|
||||
#if !defined(ARA_HANDLE_ASSERT)
|
||||
#define ARA_HANDLE_ASSERT(file, line, diagnosis) juce::handleARAAssertion (file, line, diagnosis)
|
||||
#endif
|
||||
|
||||
#if JUCE_LOG_ASSERTIONS
|
||||
#define ARA_ENABLE_DEBUG_OUTPUT 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace juce
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wgnu-zero-variadic-macro-arguments", "-Wmissing-prototypes")
|
||||
#include <ARA_Library/Debug/ARADebug.h>
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
||||
#endif
|
||||
|
|
@ -23,10 +23,34 @@
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
#if (JucePlugin_Enable_ARA || (JUCE_PLUGINHOST_ARA && (JUCE_PLUGINHOST_VST3 || JUCE_PLUGINHOST_AU))) && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
|
||||
namespace juce
|
||||
{
|
||||
#if ARA_ENABLE_INTERNAL_ASSERTS
|
||||
JUCE_API void JUCE_CALLTYPE handleARAAssertion (const char* file, const int line, const char* diagnosis) noexcept
|
||||
{
|
||||
#if (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS)
|
||||
DBG (diagnosis);
|
||||
#endif
|
||||
|
||||
logAssertion (file, line);
|
||||
|
||||
#if (JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS)
|
||||
if (juce_isRunningUnderDebugger())
|
||||
JUCE_BREAK_IN_DEBUGGER;
|
||||
JUCE_ANALYZER_NORETURN
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if JucePlugin_Enable_ARA
|
||||
#include "juce_ARADocumentControllerCommon.cpp"
|
||||
#include "juce_ARADocumentController.cpp"
|
||||
#include "juce_ARAModelObjects.cpp"
|
||||
#include "juce_ARAPlugInInstanceRoles.cpp"
|
||||
#include "juce_AudioProcessor_ARAExtensions.cpp"
|
||||
|
||||
ARA_SETUP_DEBUG_MESSAGE_PREFIX(JucePlugin_Name);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue