FreeCalypso > hg > gsm-codec-lib
annotate libgsmhr1/twts002_out.c @ 556:18aca50d68df default tip
doc/Calypso-TCH-downlink: update for FR1 BFI-with-data
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 11 Oct 2024 01:54:00 +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 } |