From 948bb17e1da9d8e4720a12753ccb9f8d42e3bb66 Mon Sep 17 00:00:00 2001 From: Nanako <469449812@qq.com> Date: Sun, 12 May 2024 10:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B8=83=E5=B1=80=E5=AE=B9?= =?UTF-8?q?=E5=99=A8,=20=E4=BF=AE=E6=94=B9=E5=8D=95=E5=88=A9=E7=B1=BB?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E5=AF=BC=E5=87=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/audio/misc/audio_buffer.cpp | 2 ++ core/misc/singleton/singleton.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/audio/misc/audio_buffer.cpp b/core/audio/misc/audio_buffer.cpp index b25e42f..90e1aac 100644 --- a/core/audio/misc/audio_buffer.cpp +++ b/core/audio/misc/audio_buffer.cpp @@ -1,5 +1,7 @@ #include "audio_buffer.h" +#include + void audio_buffer::resize(uint32_t channel_num, uint32_t block_size) { std::scoped_lock lock(lock_); buffer_.resize(channel_num); diff --git a/core/misc/singleton/singleton.h b/core/misc/singleton/singleton.h index b9d7842..98fcb87 100644 --- a/core/misc/singleton/singleton.h +++ b/core/misc/singleton/singleton.h @@ -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