Skip to content

Commit 06dc854

Browse files
committed
state pointer
1 parent eb70b25 commit 06dc854

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/rade_api.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,31 @@ extern "C" {
5858
#define RADE_FS_16000 16000 // speech sample rate
5959

6060
// note single context only in this version, one context has one Tx, and one Rx
61-
void rade_open(char model_file[]);
62-
void rade_close(void);
61+
struct rade *rade_open(char model_file[]);
62+
void rade_close(struct *rade);
6363

6464
// Allows API users to determine if the API has changed
6565
int rade_version(void);
6666

6767
// helpers to set up arrays
68-
int rade_n_tx_out(void);
69-
int rade_max_nin(void);
70-
int rade_n_features_in_out(void);
68+
int rade_n_tx_out(struct *rade);
69+
int rade_max_nin(struct *rade);
70+
int rade_n_features_in_out(struct *rade);
7171

7272
// Note vocoder is not encapsulated in API in this version
73-
void rade_tx(RADE_COMP tx_out[], float features_in[]);
73+
void rade_tx(struct *rade, RADE_COMP tx_out[], float features_in[]);
7474

7575
// call me before each call to rade_rx(), provide nin samples to rx_in[]
76-
int rade_nin(void);
76+
int rade_nin(struct *rade, void);
7777

7878
// returns non-zero if features[] contains valid output
79-
int rade_rx(float features_out[], RADE_COMP rx_in[]);
79+
int rade_rx(struct *rade, float features_out[], RADE_COMP rx_in[]);
8080

8181
// returns non-zero if Rx is currently in sync
82-
int rade_sync(void);
82+
int rade_sync(struct *rade);
8383

8484
// returns the current frequency offset of the Rx signal ( when rade_sync()!=0 )
85-
float rade_freq_offset(void);
85+
float rade_freq_offset(struct *rade);
8686

8787
#ifdef __cplusplus
8888
}

0 commit comments

Comments
 (0)