修复编译错误

This commit is contained in:
Nanako 2024-03-01 18:24:45 +08:00
parent 94b9057cbd
commit e8d341df18
3 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ void audio_buffer::multiple(float percent) {
}
}
std::vector<float> audio_buffer::get_interleaved_buffer() const {
std::vector<float> audio_buffer::get_interleaved_buffer() {
std::scoped_lock lock(lock_);
std::vector<float> result;
result.reserve(buffer_[0].size() * buffer_.size());

View File

@ -1,6 +1,6 @@
#pragma once
class audio_buffer {
class CORE_API audio_buffer {
public:
float** get_headers() { return headers_.data(); }
const std::vector<float*>& get_headers_vector() { return headers_; }
@ -14,7 +14,7 @@ public:
void mix(audio_buffer& in_buffer, float percent = 1.f);
void multiple(float percent);
std::vector<float> get_interleaved_buffer() const;
[[nodiscard]] std::vector<float> get_interleaved_buffer();
private:
std::vector<std::vector<float>> buffer_;
std::vector<float*> headers_{};

View File

@ -218,7 +218,7 @@ public:
SampleType* SrcBuffer = InternalBuffer.data();
const uint32_t ReadIndex = ReadCounter;
SampleType PoppedValue = MoveTempIfPossible(InternalBuffer[ReadIndex]);
SampleType PoppedValue = std::move(InternalBuffer[ReadIndex]);
ReadCounter = (ReadCounter + 1) % Capacity;
return PoppedValue;
}