nx_call.nx
buildroot/runtime/nx_call.nx
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
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
| 54 | struct nx_call |
consts
| 40 | const NX_CALL_STATE_UNKNOWN: i64 = 0 |
| 41 | const NX_CALL_STATE_IDLE: i64 = 1 |
| 42 | const NX_CALL_STATE_DIALING: i64 = 2 |
| 43 | const NX_CALL_STATE_LIVE: i64 = 3 // both sessions ACTIVE |
| 44 | const NX_CALL_STATE_ENDED: i64 = 4 |
| 45 | const NX_CALL_STATE_FAILED: i64 = 5 |
| 46 | const NX_CALL_STATE_N: i64 = 6 |
| 63 | const NX_CALL_BYTES: i64 = 48 |
functions
| 67 | func _nx_call_next_id() -> i64 |
| 76 | func nx_call_new_voice_only(out: *nx_call, audio: *nx_audio_session) -> i64 calls 1: _nx_call_next_id |
| 87 | func nx_call_new_voice_chat(out: *nx_call, calls 1: _nx_call_next_id |
| 108 | func nx_call_open(c: *nx_call, now_unix_ms: i64) -> i64 calls 1: nx_media_session_open |
| 128 | func nx_call_close(c: *nx_call) -> i64 calls 1: nx_media_session_close |
| 143 | func nx_call_on_remote_join(c: *nx_call, peer_id: i64, calls 1: nx_media_session_on_peer_join |
| 157 | func nx_call_on_remote_leave(c: *nx_call, reason: i64) -> i64 calls 1: nx_media_session_on_peer_leave |
| 173 | func nx_call_capture_encode(c: *nx_call, calls 1: nx_audio_session_capture_encode |
| 178 | func nx_call_decode_play(c: *nx_call, wire_in: *u8, wire_n: i64) -> i64 calls 1: nx_audio_session_decode_play |
| 182 | func nx_call_send_text(c: *nx_call, peer_id: i64, calls 1: nx_chat_session_post |
| 190 | func nx_call_id(c: *nx_call) -> i64 { return c.call_id } |
| 191 | func nx_call_state(c: *nx_call) -> i64 { return c.state } |
| 192 | func nx_call_remote_peer(c: *nx_call) -> i64 { return c.remote_peer } |
| 193 | func nx_call_uptime_ms(c: *nx_call, now_unix_ms: i64) -> i64 |
| 197 | func nx_call_audio(c: *nx_call) -> *nx_audio_session { return c.audio } |
| 198 | func nx_call_chat(c: *nx_call) -> *nx_chat_session { return c.chat } |
| 199 | func nx_call_has_chat(c: *nx_call) -> i64 |
| 206 | func nx_call_health_check(c: *nx_call) -> i64 calls 1: nx_media_session_health_check |