Role Model
A client may be:
- Audio consumer (receives PCM)
- Audio producer (sends PCM)
Core protocol behavior remains the same.
Required Sequence
- Connect to a reliable ordered full-duplex stream.
- Send
describeimmediately. - Wait for
readyand honor returned audio parameters. - Send
startto begin streaming. - Exchange audio frames.
- Send
stopto terminate the stream.
Error and Compatibility Rules
- Either side may send
error - Unknown events and frame types should be ignored
Minimal Pseudocode
conn = connect()send({"type":"describe"})ready = read()assert ready.type == "ready"
send({"type":"start"})while streaming: read_or_write_audio()
send({"type":"stop"})