- u_async.c: process immediate_queue BEFORE epoll_wait in uasync_poll - stcp_link.c: defensive NULL etcp_conn/etcp_link in stcp_link_close - utun_instance.c: move stcp_server_list_destroy_all to Phase J (before ETCP), add deferred drain in both Phase J and L - stcp.h/c: STCP_HS_ENC_CLIENT 6→38, STCP_HS_ENC_SERVER 7→39, exchange ed25519_pubkey in both handshake directions - etcp_connections.c: copy peer_ed25519 from STCP to ETCP_CONN in etcp_link_enter_ready_tcp; guard link->etcp in tcp_link_close_cb - chat_sync.c: fix lk->conn NULL dereference for TCP links - test_stcp.c: update stcp_server_create/stcp_client_connect callsites - tools/chat_tcp_test: change transport udp→tcp
35 lines
955 B
C
35 lines
955 B
C
#ifndef VOICE_RECORDER_H
|
|
#define VOICE_RECORDER_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct voice_recorder;
|
|
|
|
int voice_recorder_init(const char* db_path);
|
|
void voice_recorder_deinit(void);
|
|
|
|
int voice_recorder_start(const char* channel_id, int sample_rate, int channels);
|
|
int voice_recorder_feed(const int16_t* samples, int count);
|
|
int voice_recorder_stop(int* out_duration_ms);
|
|
void voice_recorder_cancel(void);
|
|
int voice_recorder_is_active(void);
|
|
|
|
void voice_recorder_set_preset(int preset);
|
|
int voice_recorder_get_preset(void);
|
|
void voice_recorder_set_compressor_enabled(int enabled);
|
|
int voice_recorder_is_compressor_enabled(void);
|
|
void voice_recorder_set_compressor_config(int max_gain_db, int lookback_ms, int lookahead_ms,
|
|
float rise_rate_per_sec, float target_level_db);
|
|
float voice_recorder_get_peak_level(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|