FreeCalypso > hg > gsm-codec-lib
annotate libgsmhr1/twts002_out.c @ 522:4d2cccaeb4a7
libtest: implement TW-TS-005 reader function
Spec reference:
https://www.freecalypso.org/specs/tw-ts-005-v010002.txt
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 19 Sep 2024 03:08:47 +0000 |
parents | dc7249923b3a |
children |
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 } |