修复在macos的链接问题
This commit is contained in:
parent
28b53dc273
commit
54a6bed4ed
@ -4,9 +4,9 @@
|
||||
#include "misc/singleton/singleton_manager.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "spdlog/sinks/daily_file_sink.h"
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
#include "spdlog/sinks/ansicolor_sink.h"
|
||||
#include "spdlog/sinks/stdout_sinks.h"
|
||||
#include "thread_message/thread_message_hubs.h"
|
||||
#include "window/window_manager.h"
|
||||
|
||||
application::application() {
|
||||
}
|
||||
@ -42,3 +42,10 @@ void application::shutdown() {
|
||||
spdlog::drop_all();
|
||||
spdlog::shutdown();
|
||||
}
|
||||
|
||||
bool application::update_window_manager()
|
||||
{
|
||||
g_main_thread_hub.process_messages();
|
||||
g_window_manager.update();
|
||||
return true;
|
||||
}
|
||||
|
@ -24,6 +24,12 @@ public:
|
||||
|
||||
virtual void shutdown();
|
||||
|
||||
virtual void tick(float delta_time) {}
|
||||
|
||||
bool update_window_manager();
|
||||
|
||||
virtual void tick(float delta_time)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
};
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "thread_message/thread_message_hubs.h"
|
||||
|
||||
IMPL_SINGLETON_INSTANCE(audio_device_manager)
|
||||
|
||||
int rt_audio_callback(void* output_buffer, void *input_buffer,
|
||||
unsigned int frames_nums,
|
||||
double stream_time,
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "misc/query_timer.h"
|
||||
#include "thread_message/thread_message_hubs.h"
|
||||
|
||||
IMPL_SINGLETON_INSTANCE(mixer)
|
||||
|
||||
void build_effect_channel_interface(mixer_track* track, const channel_interface* in_interface, std::map<mixer_track*, int32_t>& processed_tracks) {
|
||||
ZoneScoped;
|
||||
int32_t& track_current_layer = processed_tracks[track];
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "vst2/vst2_plugin_host.h"
|
||||
|
||||
IMPL_SINGLETON_INSTANCE(midi_sequencer)
|
||||
|
||||
void midi_sequencer::init(singleton_initliazer& initliazer) {
|
||||
singleton_t<midi_sequencer>::init(initliazer);
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include "window/window_manager.h"
|
||||
#include "tracy/tracy.hpp"
|
||||
|
||||
IMPL_SINGLETON_INSTANCE(plugin_host_manager)
|
||||
|
||||
void plugin_host_manager::init(singleton_initliazer& initliazer) {
|
||||
ZoneScoped;
|
||||
singleton_t<plugin_host_manager>::init(initliazer);
|
||||
|
@ -112,8 +112,8 @@ VstIntPtr vst_master_callback(AEffect* effect, VstInt32 opcode, VstInt32 index,
|
||||
case audioMasterProcessEvents:
|
||||
// TODO
|
||||
{
|
||||
VstEvents* Events = (VstEvents*)ptr;
|
||||
Events->events[0]->type;
|
||||
// VstEvents* Events = (VstEvents*)ptr;
|
||||
// Events->events[0]->type;
|
||||
// FVST2PluginHost* Host = static_cast<FVST2PluginHost*>(Effect->user);
|
||||
|
||||
}
|
||||
|
@ -1,11 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef core_EXPORTS
|
||||
#define CORE_API __declspec(dllexport)
|
||||
#if PLATFORM_WINDOWS
|
||||
#ifdef core_EXPORTS
|
||||
#define CORE_API __declspec(dllexport)
|
||||
#else
|
||||
#define CORE_API __declspec(dllimport)
|
||||
#endif
|
||||
#elif PLATFORM_MACOS || PLATFORM_LINUX
|
||||
#ifdef core_EXPORTS
|
||||
#define CORE_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define CORE_API
|
||||
#endif
|
||||
#else
|
||||
#define CORE_API __declspec(dllimport)
|
||||
#error Unsupported platform
|
||||
#endif
|
||||
#else
|
||||
#define CORE_API
|
||||
#endif
|
@ -43,10 +43,13 @@ public:
|
||||
};
|
||||
|
||||
#if defined(core_EXPORTS)
|
||||
#define DEFINE_SINGLETON_INSTANCE(T) \
|
||||
inline T g_##T; \
|
||||
extern "C" CORE_API inline T* get_##T() { return &g_##T; }
|
||||
#else
|
||||
#define DEFINE_SINGLETON_INSTANCE(T) \
|
||||
extern "C" CORE_API T* get_##T();
|
||||
#define DEFINE_SINGLETON_INSTANCE(T) \
|
||||
inline T g_##T; \
|
||||
extern "C" CORE_API T* get_##T();
|
||||
#else
|
||||
#define DEFINE_SINGLETON_INSTANCE(T) \
|
||||
extern "C" CORE_API T* get_##T();
|
||||
#endif
|
||||
|
||||
#define IMPL_SINGLETON_INSTANCE(T) \
|
||||
T* get_##T() { return &g_##T; }
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include "GLFW/glfw3.h"
|
||||
#include "GLFW/glfw3native.h"
|
||||
|
||||
IMPL_SINGLETON_INSTANCE(window_manager)
|
||||
|
||||
void window_manager::init(singleton_initliazer& initliazer) {
|
||||
singleton_t<window_manager>::init(initliazer);
|
||||
auto plugin_host = initliazer.require<plugin_host_manager>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user