step C(android): compile engine.rs on Android with a stub CallEngine::start
Third incremental variable. Previously the engine module was cfg-gated out of the Android build entirely (`#[cfg(not(target_os = "android"))] mod engine;` in lib.rs). Now it's always compiled, so any link-time effect of having engine.rs in the compilation unit can be measured against the working baseline from build #19. Changes kept deliberately small: - lib.rs: drop the cfg gate on `mod engine;`. `use engine::CallEngine` stays gated because the Android-specific connect/disconnect/... stubs in lib.rs don't reference the type. - engine.rs: the `wzp_client::{audio_io, call}` imports + CodecId + QualityProfile are gated to non-Android (they require the `audio` feature on wzp-client which Android doesn't pull in). On Android we keep only the MediaTransport import for transport.close(). The impl block now has two `start()` methods: the full CPAL-backed one for desktop, and a 6-line Android stub that returns `Err("audio engine not yet wired on Android")` so attempts to `connect` from the UI fail cleanly. Goal: verify that linking in the compiled engine module (plus the types it references) on Android doesn't regress the working baseline. Home screen should still render and register_signal should still work. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
windows_subsystem = "windows"
|
||||
)]
|
||||
|
||||
// CPAL-backed audio engine — desktop only. On Android we'll plug in an
|
||||
// oboe/AAudio backend in a later step.
|
||||
#[cfg(not(target_os = "android"))]
|
||||
// Call engine — now compiled on every platform. On desktop it runs the real
|
||||
// CPAL/VPIO audio pipeline; on Android `CallEngine::start()` currently returns
|
||||
// an error stub (see engine.rs — that's step C of the Oboe integration).
|
||||
mod engine;
|
||||
|
||||
// CallEngine is only referenced from the non-Android connect/disconnect/etc
|
||||
// commands; the Android stubs return errors directly.
|
||||
#[cfg(not(target_os = "android"))]
|
||||
use engine::CallEngine;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user