Add JOC downmix configurations 0..4, cross-layer notes, and the analysis-side clipgain
ci / ubuntu-latest (push) Failing after 15s
ci / macos-latest (push) Has been cancelled
ci / windows-latest (push) Has been cancelled

This commit is contained in:
TheM14 committed 2026-10-16 19:52:04 +08:00
1 parent 338a4f4d36
commit 6f6b5db6c2
32 files changed
+1973 -276

No files matched your search

+2 -2
View File
@@ -21,8 +21,8 @@ bool variable_bits(BitReader& reader, unsigned width, unsigned max_groups, std::
}
value = (value + 1u) << width;
}
// Same failure mode as the reference implementation: an extension chain
// that never terminates is a syntax error, not a truncation.
// An extension chain that never terminates is a syntax error, not a
// truncation.
reader.fail(JOC_ERR_EMDF_SYNTAX, "variable_bits extension groups exceeded");
return false;
}
+16
View File
@@ -33,6 +33,22 @@ private:
std::string message_;
};
// Structured detail of the most recent failing call, as returned by
// joc_last_error_detail(). It is one instance per thread across the whole
// library, so every C entry point -- the task API and the streaming API alike --
// reports through the same string.
inline thread_local std::string last_error_detail;
inline void record_error_detail(const Status& status) {
if (status.ok()) {
last_error_detail.clear();
return;
}
last_error_detail.assign(status.stage());
last_error_detail.append(": ");
last_error_detail.append(status.message());
}
// Stage names are kept as plain literals so that C++ and the Python frontend
namespace stage {
inline constexpr const char* kFoundation = "foundation";