diff libgsmefr/enc_create.c @ 51:722959d9410f

libgsmefr: implement EFR_{en,de}coder_create() functions
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 25 Nov 2022 06:46:22 +0000
parents libgsmfrp/state.c@286d5f097eb4
children 23656d874524
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgsmefr/enc_create.c	Fri Nov 25 06:46:22 2022 +0000
@@ -0,0 +1,20 @@
+/*
+ * In this module we implement allocation and initialization
+ * of state structures for our GSM EFR encoder.
+ */
+
+#include <stdlib.h>
+#include "gsm_efr.h"
+#include "typedef.h"
+#include "cnst.h"
+#include "enc_state.h"
+
+struct EFR_encoder_state *EFR_encoder_create(int dtx)
+{
+	struct EFR_encoder_state *st;
+
+	st = malloc(sizeof(struct EFR_encoder_state));
+	if (st)
+		EFR_encoder_reset(st, dtx);
+	return st;
+}