# HG changeset patch # User Mychaela Falconia # Date 1684711980 28800 # Node ID fbfa72b114e8553e265e03c67dff0e818878b839 # Parent d96eaf2d6900eac69c46ba1b81177a04b1706b47 sip-manual-out: prep for making PCM fill octet changeable diff -r d96eaf2d6900 -r fbfa72b114e8 sip-manual-out/rtp_tx.c --- a/sip-manual-out/rtp_tx.c Sun May 07 21:55:01 2023 -0800 +++ b/sip-manual-out/rtp_tx.c Sun May 21 15:33:00 2023 -0800 @@ -24,6 +24,8 @@ static uint32_t rtp_out_ts; static uint16_t rtp_out_seq; +static uint8_t pcm_fill_octet; + static uint16_t tfo_fill_buf[9], tfo_req_buf[7]; static uint16_t *is_out_ptr; static unsigned is_out_count; @@ -36,6 +38,15 @@ } void +init_pcm_fill_octet() +{ + if (pcma_selected) + pcm_fill_octet = 0xD5; + else + pcm_fill_octet = 0xFF; +} + +void prepare_tfo_fill() { tfo_fill_buf[0] = 0x15A; @@ -78,7 +89,7 @@ pkt.tstamp = htonl(rtp_out_ts); rtp_out_ts += 160; pkt.ssrc = rtp_ssrc; - memset(pkt.payload, pcma_selected ? 0xD5 : 0xFF, RTP_MAX_PAYLOAD); + memset(pkt.payload, pcm_fill_octet, RTP_MAX_PAYLOAD); if (is_out_count) { insert_is_msg(pkt.payload, *is_out_ptr++); is_out_count--; diff -r d96eaf2d6900 -r fbfa72b114e8 sip-manual-out/sdp_in.c --- a/sip-manual-out/sdp_in.c Sun May 07 21:55:01 2023 -0800 +++ b/sip-manual-out/sdp_in.c Sun May 21 15:33:00 2023 -0800 @@ -73,5 +73,6 @@ rtp_remote_addr.sin_port = htons(sdp_parse.audio_port); rtp_out_enable = 1; assign_rtpout_ssrc(); + init_pcm_fill_octet(); prepare_tfo_fill(); }