<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div bgcolor="#ffffff" text="#000000">I have problems streaming live PCM audio. Audio comes either
directly<br>
from microphone (16-bit LE) or from hardware encoder (A-LAW).</div></blockquote><div><br></div>The problem is that a-law audio is *not* PCM, and therefore has a different RTP payload format (if a-law audio is what you're sending).</div><div><br></div><div>Specifically, if you're streaming a-law audio, then when you create your "SimpleRTPSink" object, the "rtpPayloadFormatName" parameter should be "PCMA" (and, of course, the "sdpMediaTypeString" parameter will be "audio"). Because a-law audio is 8-bits per sample, you don't do any byte swapping.</div><div><br></div><div>If, on the other hand, you are converting the audio from (8-bit) a-law to (16-bit) PCM before streaming it, then you need to (1) make sure that the 16-bit audio is in big-endian order, and (2) use "L16" as the "rtpPayloadFormatName" parameter when you create your "SimpleRTPSink".</div><div><br></div><div><blockquote type="cite"><div bgcolor="#ffffff" text="#000000">I know that audio is correct, because if I save it to file instead
of sending to<br>
RTPSink, convert to WAV and stream via testWAVAudioStreamer, VLC
reproduces<br>
it correctly.</div></blockquote><div><br></div>That works because (presumably) there's an appropriate header in the WAV file that tells "testWAVAudioStreamer" what kind of audio this is. If you run "testRTSPClient" on the stream, and look at the SDP description, you'll see the proper RTP payload format name name ("PCMA" or "L16") for this audio.</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>