From 8c36fb5651e912c6836bb95430c69459f4635d0c Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Thu, 9 Apr 2026 21:25:38 +0400 Subject: [PATCH] fix(wzp-native): Oboe ResultWithValue has no value_or, unfold explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cc-rs build of oboe_bridge.cpp failed at cfa9ff6 because the Oboe ResultWithValue template returned by getXRunCount() does not have a .value_or(T) method — only .value(). Replace with an explicit bool-conversion + .value() guard that yields -1 on error. --- crates/wzp-native/cpp/oboe_bridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/wzp-native/cpp/oboe_bridge.cpp b/crates/wzp-native/cpp/oboe_bridge.cpp index c9e6de4..59aaa63 100644 --- a/crates/wzp-native/cpp/oboe_bridge.cpp +++ b/crates/wzp-native/cpp/oboe_bridge.cpp @@ -211,7 +211,8 @@ public: calls++; if ((calls % 50) == 0) { int state = (int)stream->getState(); - int xruns = stream->getXRunCount().value_or(-1); + auto xrunRes = stream->getXRunCount(); + int xruns = xrunRes ? xrunRes.value() : -1; LOGI("playout heartbeat: calls=%llu nonempty=%llu numFrames=%d ring_avail_read=%d to_read=%d underrun_frames=%llu total_played_real=%llu state=%d xruns=%d", (unsigned long long)calls, (unsigned long long)nonempty_calls, numFrames, avail, to_read,