Skip to content

Add L16 linear PCM codec for AudioBridge media - #2

Closed
mirkobrankovic82 wants to merge 1 commit into
masterfrom
feature/audiobridge-l16
Closed

Add L16 linear PCM codec for AudioBridge media#2
mirkobrankovic82 wants to merge 1 commit into
masterfrom
feature/audiobridge-l16

Conversation

@mirkobrankovic82

@mirkobrankovic82 mirkobrankovic82 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add AudioBridge support for L16 linear PCM (l16 @ 16 kHz, PT 106; l16-48 @ 48 kHz, PT 105) on plain RTP and media=websocket joins.
  • Wire rtpws call_info to the participant join codec (not hardcoded Opus).
  • Decode/encode big-endian slinear RTP in the participant thread; restrict L16 joins to matching room sampling_rate.
  • Extend ws-audio-test with --codec l16 / l16-48 and BE PCM tone generation.

Base: master (fork-only draft, not targeting meetecho/janus-gateway).

Usage

go run . ws-stream   --janus-http http://127.0.0.1:8088/janus   --token "$TOKEN" --room l16-demo   --codec l16 --tone --expect-rx 50

Expected call_info:

{"type":"call_info","codec":"l16","sample_rate":16000,"channels":1,"ptime_ms":20,"payload_type":106}

Test plan

  • Join with codec=l16 in a 16 kHz room → call_info PT 106, 640-byte payloads
  • Join with codec=l16-48 in a 48 kHz room → call_info PT 105, 1920-byte payloads
  • Reject l16 join when room sampling_rate is not 16000
  • ws-stream --codec l16 --tone --expect-rx 50 bidirectional RTP

Support l16 and l16-48 on join, decode/encode, plain RTP and rtpws
call_info with room sampling_rate validation; extend ws-audio-test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mirkobrankovic82
mirkobrankovic82 force-pushed the feature/audiobridge-l16 branch from 53d759c to d349eb3 Compare July 6, 2026 12:02
@mirkobrankovic82 mirkobrankovic82 changed the title Add L16 linear PCM codec for AudioBridge WebSocket media Add L16 linear PCM codec for AudioBridge media Jul 6, 2026
@mirkobrankovic82
mirkobrankovic82 changed the base branch from feature/audiobridge-rtpws to master July 6, 2026 12:02
@mirkobrankovic82
mirkobrankovic82 marked this pull request as ready for review July 6, 2026 12:51
@mirkobrankovic82

Copy link
Copy Markdown
Owner Author

Superseded by #7, which carries this same L16 commit plus the payload-only framing feature (stacked on feature/audiobridge-rtpws). Closing to avoid duplicate L16 commits in the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant