Rework audio output, connecting AudioOut into coretiming to fix desync during heavy loads.

This commit is contained in:
Kelebek1
2022-08-01 02:58:13 +01:00
parent a83a5d2e4c
commit ea9ff71725
23 changed files with 550 additions and 841 deletions

View File

@ -43,13 +43,15 @@ void BehaviorInfo::AppendError(ErrorInfo& error) {
}
void BehaviorInfo::CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) {
auto error_count_{std::min(error_count, MaxErrors)};
std::memset(out_errors.data(), 0, MaxErrors * sizeof(ErrorInfo));
out_count = std::min(error_count, MaxErrors);
for (size_t i = 0; i < error_count_; i++) {
out_errors[i] = errors[i];
for (size_t i = 0; i < MaxErrors; i++) {
if (i < out_count) {
out_errors[i] = errors[i];
} else {
out_errors[i] = {};
}
}
out_count = error_count_;
}
void BehaviorInfo::UpdateFlags(const Flags flags_) {