Skip to content

Add support for L16 / LPCM audio codec #219

@kinsleykajiva

Description

@kinsleykajiva

Is your feature request related to a problem? Please describe.
Currently, the library does not appear to support raw PCM (L16 / LPCM) audio streams. This makes it difficult to integrate uncompressed audio data sources (like WAV files or hardware audio streams) with WebRTC without first transcoding to Opus or another supported codec.

I'm working with Asterisk and SIP endpoints that use L16 for raw audio transport, and I’d like to be able to interoperate directly without adding extra transcoding layers.

Describe the solution you'd like
It would be great if webrtc-java could support sending and receiving L16 / LPCM audio.
This could be achieved by allowing the creation of AudioTrack instances that advertise L16 in SDP and accept/produce raw PCM samples at standard rates (e.g., 8000, 16000, 44100, 48000 Hz).

Describe alternatives you've considered

  • Using Opus as a middle layer for encoding/decoding audio (adds complexity and CPU load).
  • Implementing a custom RTP stream sender using L16 payloads outside the webrtc-java stack.
    Both work but are not ideal for simple uncompressed audio pipelines.

Additional context
L16 is widely supported in SIP and WebRTC environments for raw PCM audio, especially for telephony interop or studio-grade audio transfer.
Adding it would make webrtc-java more flexible for gateway applications, SIP bridges, and testing tools.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions