修复macos编译

This commit is contained in:
2024-03-25 06:17:04 +08:00
parent 00d6b5fb69
commit 19c2b0fe2b
7 changed files with 15 additions and 6 deletions

View File

@@ -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));
}
}