comparison libgsmfr2/enc_homing.c @ 275:5fbb323b2978

libgsmfr2: implement encoder homing
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Apr 2024 03:06:03 +0000
parents
children
comparison
equal deleted inserted replaced
274:52c667f17d2c 275:5fbb323b2978
1 /*
2 * This module contains our implementation of the optional homing feature
3 * for our GSM 06.10 encoder.
4 */
5
6 #include <stdint.h>
7 #include "tw_gsmfr.h"
8
9 void gsmfr_0610_encoder_homing(struct gsmfr_0610_state *st, const int16_t *pcm)
10 {
11 int i;
12
13 for (i = 0; i < 160; i++) {
14 if (pcm[i] != 0x0008)
15 return;
16 }
17 gsmfr_0610_reset(st);
18 }