修复macos编译
This commit is contained in:
parent
00d6b5fb69
commit
19c2b0fe2b
@ -57,9 +57,8 @@ function(retrieve_files path out_files)
|
||||
endfunction()
|
||||
|
||||
# setup rtaudio
|
||||
set(RTAUDIO_API_ASIO ON CACHE BOOL "" FORCE)
|
||||
|
||||
if (WIN32)
|
||||
set(RTAUDIO_API_ASIO ON CACHE BOOL "" FORCE)
|
||||
set(RTAUDIO_API_WASAPI ON CACHE BOOL "" FORCE)
|
||||
set(RTAUDIO_API_DS OFF CACHE BOOL "" FORCE)
|
||||
elseif(APPLE)
|
||||
|
@ -13,7 +13,7 @@ void audio_buffer::resize(uint32_t channel_num, uint32_t block_size) {
|
||||
void audio_buffer::clear() {
|
||||
std::scoped_lock lock(lock_);
|
||||
for (auto& channel : buffer_) {
|
||||
std::fill(channel.begin(), channel.end(), 0.f);
|
||||
std::memset(channel.data(), 0, channel.size() * sizeof(float));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef core_EXPORTS
|
||||
#define CORE_API __declspec(dllexport)
|
||||
#else
|
||||
#define CORE_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define CORE_API
|
||||
#endif
|
@ -18,7 +18,7 @@ public:
|
||||
#ifdef _WIN32
|
||||
hModule = LoadLibraryA(library_path.c_str());
|
||||
#else
|
||||
handle = dlopen(libraryPath.c_str(), RTLD_LAZY);
|
||||
handle = dlopen(library_path.c_str(), RTLD_LAZY);
|
||||
#endif
|
||||
if (!get_handle()) {
|
||||
spdlog::error("Failed to load library: {}", library_path);
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include "singleton_manager.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <__algorithm/ranges_find.h>
|
||||
#endif
|
||||
#include "singleton.h"
|
||||
|
||||
bool singleton_initliazer::has_init(singleton* s) {
|
||||
|
4
third_party/mempool/extern.h
vendored
4
third_party/mempool/extern.h
vendored
@ -1,7 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef mempool_EXPORTS
|
||||
#define MEMPOOL_API __declspec(dllexport)
|
||||
#else
|
||||
#define MEMPOOL_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define MEMPOOL_API
|
||||
#endif
|
2
third_party/mempool/mempool/unistd.h
vendored
2
third_party/mempool/mempool/unistd.h
vendored
@ -8,5 +8,5 @@ inline uintptr_t getpagesize() {
|
||||
return systemInfo.dwPageSize;
|
||||
}
|
||||
#else
|
||||
#include <unisid.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user