comparison libgsmhr1/twts002_out.c @ 493:dc7249923b3a

libgsmhr1: implement TW-TS-002 output
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 17 Jun 2024 23:00:57 +0000
parents
children
comparison
equal deleted inserted replaced
492:cc3a831712a4 493:dc7249923b3a
1 /*
2 * The function implemented in this module converts the output of HRv1
3 * speech encoder into an RTP payload per TW-TS-002, which in this
4 * particular case is also a valid RFC 5993 payload.
5 */
6
7 #include <stdint.h>
8 #include "tw_gsmhr.h"
9
10 void gsmhr_encoder_twts002_out(const int16_t *params, uint8_t *payload)
11 {
12 payload[0] = params[19] ? 0x00 : 0x20;
13 gsmhr_pack_ts101318(params, payload + 1);
14 }