diff libtwamr/tw_amr.h @ 307:6b33f3ba4289

libtwamr: go for single-chunk-state approach
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 16 Apr 2024 17:18:04 +0000
parents 57b4053559ff
children e4ce7972737f
line wrap: on
line diff
--- a/libtwamr/tw_amr.h	Mon Apr 15 23:47:51 2024 +0000
+++ b/libtwamr/tw_amr.h	Tue Apr 16 17:18:04 2024 +0000
@@ -1,7 +1,7 @@
 /*
  * This header file is the external public interface to libtwamr;
  * it should be installed in the same system include directory
- * as <gsm.h> and <gsm_efr.h> for more classic GSM codecs.
+ * as <tw_gsmfr.h> and <gsm_efr.h> for more classic GSM codecs.
  */
 
 #ifndef	__THEMWI_AMR_H
@@ -62,12 +62,8 @@
 struct amr_encoder_state *amr_encoder_create(int dtx);
 struct amr_decoder_state *amr_decoder_create(void);
 
-/* special freeing functions to deal with extra internal structs */
-void amr_encoder_free(struct amr_encoder_state *st);
-void amr_decoder_free(struct amr_decoder_state *st);
-
 /* reset state to initial */
-void amr_encoder_reset(struct amr_encoder_state *st);
+void amr_encoder_reset(struct amr_encoder_state *st, int dtx);
 void amr_decoder_reset(struct amr_decoder_state *st);
 
 /* interface structure for passing frames of codec parameters */
@@ -80,8 +76,8 @@
 
 /* encoder and decoder main functions */
 
-void amr_encode_frame(struct amr_encoder_state *st, const int16_t *pcm,
-			struct amr_param_frame *frame);
+void amr_encode_frame(struct amr_encoder_state *st, enum Mode mode,
+			const int16_t *pcm, struct amr_param_frame *frame);
 
 void amr_decode_frame(struct amr_decoder_state *st,
 			const struct amr_param_frame *frame, int16_t *pcm);