Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit fc8b1a2

Browse files
Add symbols export
1 parent 565a1aa commit fc8b1a2

7 files changed

+76
-29
lines changed

Context.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/*****************************************************************//**
1+
/*****************************************************************//**
22
* \file Context.h
33
* \brief Directly Musical Data Access library for VST3 with JUCE.
44
*
55
* \author WuChang
66
* \email 31423836@qq.com
7-
* \date July 2023
8-
* \version 1.0.0
7+
* \date Jan 2024
8+
* \version 1.2.3
99
* \license MIT License
1010
*********************************************************************/
1111

@@ -19,7 +19,7 @@ namespace DMDA {
1919
*
2020
* You can inherit this to create your own context types.
2121
*/
22-
class Context {
22+
class DMDA_API Context {
2323
public:
2424
Context() = default;
2525
virtual ~Context();
@@ -31,7 +31,7 @@ namespace DMDA {
3131
* You can inhert this in DMDA host then pass the object pointer
3232
* to Context::addListener() method to listen the change of the context.
3333
*/
34-
class Listener {
34+
class DMDA_API Listener {
3535
public:
3636
virtual ~Listener() = default;
3737

DMDA.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* \author WuChang
66
* \email 31423836@qq.com
7-
* \date Dec 2023
8-
* \version 1.2.2
7+
* \date Jan 2024
8+
* \version 1.2.3
99
* \license MIT License
1010
*********************************************************************/
1111

@@ -15,7 +15,7 @@
1515
#include "Context.h"
1616
#include "MidiFileContext.h"
1717

18-
#define DMDA_VERSION "1.2.2"
18+
#define DMDA_VERSION "1.2.3"
1919

2020
#if DMDA_PLUGIN
2121

Macros.h

+48-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/*****************************************************************//**
1+
/*****************************************************************//**
22
* \file Macros.h
33
* \brief Directly Musical Data Access library for VST3 with JUCE.
44
*
55
* \author WuChang
66
* \email 31423836@qq.com
7-
* \date July 2023
8-
* \version 1.0.0
7+
* \date Jan 2024
8+
* \version 1.2.3
99
* \license MIT License
1010
*********************************************************************/
1111

@@ -19,3 +19,48 @@
1919
#ifndef DMDA_PLUGIN
2020
#define DMDA_PLUGIN 0
2121
#endif // !DMDA_PLUGIN
22+
23+
#if defined (__clang__)
24+
#define DMDA_CLANG 1
25+
26+
#elif defined (__GNUC__)
27+
#define DMDA_GCC 1
28+
29+
#elif defined (_MSC_VER)
30+
#define DMDA_MSVC 1
31+
32+
#else
33+
#error Unknown cpp compiler
34+
#endif
35+
36+
#if DMDA_MSVC
37+
#define DMDA_EXPORT __declspec(dllexport)
38+
#define DMDA_IMPORT __declspec(dllimport)
39+
#define DMDA_CALL _cdecl
40+
#endif
41+
42+
#if DMDA_CLANG
43+
#define DMDA_EXPORT __attribute__((visibility("default")))
44+
#define DMDA_IMPORT __attribute__((visibility("default")))
45+
#define DMDA_CALL
46+
#endif
47+
48+
#if DMDA_GCC
49+
#define DMDA_EXPORT __attribute__((visibility("default")))
50+
#define DMDA_IMPORT __attribute__((visibility("default")))
51+
#define DMDA_CALL
52+
#endif
53+
54+
#if !(DMDA_MSVC || DMDA_CLANG || DMDA_GCC)
55+
#define DMDA_EXPORT
56+
#define DMDA_IMPORT
57+
#define DMDA_CALL
58+
#endif
59+
60+
#if DMDA_DLL_BUILD
61+
#define DMDA_API DMDA_EXPORT
62+
#elif DMDA_DLL
63+
#define DMDA_API DMDA_IMPORT
64+
#else
65+
#define DMDA_API
66+
#endif // DMDA_DLL_BUILD

MidiFileContext.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/*****************************************************************//**
1+
/*****************************************************************//**
22
* \file MidiFileContext.h
33
* \brief Directly Musical Data Access library for VST3 with JUCE.
44
*
55
* \author WuChang
66
* \email 31423836@qq.com
7-
* \date Aug 2023
8-
* \version 1.2.1
7+
* \date Jan 2024
8+
* \version 1.2.3
99
* \license MIT License
1010
*********************************************************************/
1111

@@ -18,7 +18,7 @@ namespace DMDA {
1818
/**
1919
* The DMDA context with juce::MidiFile data.
2020
*/
21-
class MidiFileContext : public Context {
21+
class DMDA_API MidiFileContext : public Context {
2222
public:
2323
MidiFileContext() = default;
2424

PluginExtensions.h

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
/*****************************************************************//**
1+
/*****************************************************************//**
22
* \file PluginExtensions.h
33
* \brief Directly Musical Data Access library for VST3 with JUCE.
44
*
55
* \author WuChang
66
* \email 31423836@qq.com
7-
* \date July 2023
8-
* \version 1.0.0
7+
* \date Jan 2024
8+
* \version 1.2.3
99
* \license MIT License
1010
*********************************************************************/
1111

1212
#pragma once
1313

1414
#include <JuceHeader.h>
1515

16+
#include "Macros.h"
17+
1618
namespace DMDA {
1719
class PluginProcessor;
1820

19-
enum class Vst3Result : int32_t {
21+
enum class DMDA_API Vst3Result : int32_t {
2022
OK = 0,
2123
ERROR = -1
2224
};
2325

24-
class Vst3Extensions : public juce::VST3ClientExtensions {
26+
class DMDA_API Vst3Extensions : public juce::VST3ClientExtensions {
2527
public:
2628
Vst3Extensions() = delete;
2729
explicit Vst3Extensions(PluginProcessor* processor);

PluginProcessor.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/*****************************************************************//**
1+
/*****************************************************************//**
22
* \file PluginProcessor.h
33
* \brief Directly Musical Data Access library for VST3 with JUCE.
44
*
55
* \author WuChang
66
* \email 31423836@qq.com
7-
* \date July 2023
8-
* \version 1.0.2
7+
* \date Jan 2024
8+
* \version 1.2.3
99
* \license MIT License
1010
*********************************************************************/
1111

@@ -37,7 +37,7 @@ namespace DMDA {
3737
* And you should call initContext() method in your constructor to
3838
* create the context.
3939
*/
40-
class PluginProcessor : public juce::AudioProcessor {
40+
class DMDA_API PluginProcessor : public juce::AudioProcessor {
4141
public:
4242
PluginProcessor();
4343
PluginProcessor(

PluginVisitor.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/*****************************************************************//**
1+
/*****************************************************************//**
22
* \file PluginVisitor.h
33
* \brief Directly Musical Data Access library for VST3 with JUCE.
44
*
55
* \author WuChang
66
* \email 31423836@qq.com
7-
* \date July 2023
8-
* \version 1.0.0
7+
* \date Jan 2024
8+
* \version 1.2.3
99
* \license MIT License
1010
*********************************************************************/
1111

@@ -25,7 +25,7 @@ namespace DMDA {
2525
* You can pass it to AudioPluginInstance::getExtensions()
2626
* then the handleContext() method could be invoked.
2727
*/
28-
class PluginVisitor : public juce::ExtensionsVisitor {
28+
class DMDA_API PluginVisitor : public juce::ExtensionsVisitor {
2929
public:
3030
virtual ~PluginVisitor() override = default;
3131
/**
@@ -57,7 +57,7 @@ namespace DMDA {
5757
* thePluginInstance->getExtensions(handler);
5858
* @endcode
5959
*/
60-
class PluginHandler final : public PluginVisitor {
60+
class DMDA_API PluginHandler final : public PluginVisitor {
6161
public:
6262
PluginHandler() = delete;
6363
PluginHandler(std::function<void(Context*)> function);

0 commit comments

Comments
 (0)