code wiki / (root) / nx_call.nx

nx_call.nx

buildroot/runtime/nx_call.nx

7496 B218 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind orphan library
docsdependenciesstructsconstsfunctions

about

nx_call.nx -- 1:1 audio + chat call. Per NISHI_COMMS_ROADMAP.md (the Texas <-> Ukraine son-talking-to- girlfriend use case): a sovereign peer-to-peer voice call with optional chat alongside, no Telegram in the path. COMPOSES (does not subclass): nx_audio_session -- voice over the NishiVoice codec nx_chat_session -- text overlay nx_media_session -- shared lifecycle vtable Per cardinal feedback-bits-up-exceed-never-match: zero new transport logic here. The call just wires two sessions together behind a tiny API surface so the consumer (web UI / CLI / IoT tablet) doesn't deal with two separate session lifecycles. Future composition (queued, not in v1): nx_signaling.nx -- SDP exchange + ICE candidates nx_p2p_mesh.nx -- single-peer p2p path (mesh degenerates to 1:1) nx_turn_client.nx -- sovereign TURN client (after L3-A.5.2 lands)

dependencies 8 imports · 0 importers

nx_syscalls_x86_64.nx nx_media_session.nx nx_codec.nx nx_audio_capture.nx nx_audio_playback.nx nx_audio_session.nx nx_chat_ring.nx nx_chat_session.nx nx_call.nx

imports: nx_syscalls_x86_64.nxnx_media_session.nxnx_codec.nxnx_audio_capture.nxnx_audio_playback.nxnx_audio_session.nxnx_chat_ring.nxnx_chat_session.nx

imported by: nobody (leaf or entry point)

structs

54struct nx_call

consts

40const NX_CALL_STATE_UNKNOWN: i64 = 0
41const NX_CALL_STATE_IDLE: i64 = 1
42const NX_CALL_STATE_DIALING: i64 = 2
43const NX_CALL_STATE_LIVE: i64 = 3 // both sessions ACTIVE
44const NX_CALL_STATE_ENDED: i64 = 4
45const NX_CALL_STATE_FAILED: i64 = 5
46const NX_CALL_STATE_N: i64 = 6
63const NX_CALL_BYTES: i64 = 48

functions

67func _nx_call_next_id() -> i64
76func nx_call_new_voice_only(out: *nx_call, audio: *nx_audio_session) -> i64
87func nx_call_new_voice_chat(out: *nx_call,
108func nx_call_open(c: *nx_call, now_unix_ms: i64) -> i64
128func nx_call_close(c: *nx_call) -> i64
143func nx_call_on_remote_join(c: *nx_call, peer_id: i64,
157func nx_call_on_remote_leave(c: *nx_call, reason: i64) -> i64
173func nx_call_capture_encode(c: *nx_call,
178func nx_call_decode_play(c: *nx_call, wire_in: *u8, wire_n: i64) -> i64
182func nx_call_send_text(c: *nx_call, peer_id: i64,
190func nx_call_id(c: *nx_call) -> i64 { return c.call_id }
191func nx_call_state(c: *nx_call) -> i64 { return c.state }
192func nx_call_remote_peer(c: *nx_call) -> i64 { return c.remote_peer }
193func nx_call_uptime_ms(c: *nx_call, now_unix_ms: i64) -> i64
197func nx_call_audio(c: *nx_call) -> *nx_audio_session { return c.audio }
198func nx_call_chat(c: *nx_call) -> *nx_chat_session { return c.chat }
199func nx_call_has_chat(c: *nx_call) -> i64
206func nx_call_health_check(c: *nx_call) -> i64