annotate libgsmhr1/twts002_out.c @ 536:a3300483ae74

doc/FR1-library-API: document return value from gsmfr_tfo_xfrm_*
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 21 Sep 2024 20:48:58 +0000
parents dc7249923b3a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
493
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * The function implemented in this module converts the output of HRv1
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * speech encoder into an RTP payload per TW-TS-002, which in this
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * particular case is also a valid RFC 5993 payload.
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 */
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include <stdint.h>
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include "tw_gsmhr.h"
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 void gsmhr_encoder_twts002_out(const int16_t *params, uint8_t *payload)
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 {
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 payload[0] = params[19] ? 0x00 : 0x20;
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 gsmhr_pack_ts101318(params, payload + 1);
dc7249923b3a libgsmhr1: implement TW-TS-002 output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 }