修改布局容器, 修改单利类实例导出方式

This commit is contained in:
Nanako 2024-05-12 10:40:58 +08:00
parent 584e2ea19e
commit 948bb17e1d
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#include "audio_buffer.h"
#include <cstring>
void audio_buffer::resize(uint32_t channel_num, uint32_t block_size) {
std::scoped_lock lock(lock_);
buffer_.resize(channel_num);

View File

@ -45,8 +45,8 @@ 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; }
extern "C" CORE_API inline T* get_##T() { return &g_##T; }
#else
#define DEFINE_SINGLETON_INSTANCE(T) \
extern "C" CORE_API inline T& get_##T();
extern "C" CORE_API inline T* get_##T();
#endif